Solved

Urgent: How to RedirectMatch 301 all files on server to new file extension

Posted on 2006-07-10
3
234 Views
Last Modified: 2010-03-04
HI All -

All the files on out webserver were recently changed from .html to .php due to various platform and programming reasons.  The directory structure and filenames were all preserved however, so I would like to be able to set a site wide permanent redirect so that any request made to a .html page (in any directory) will be redirected to that same page, with a .php extension instead.  

Is it possible to do this by setting the instruction in the httpd.conf file? If so, what would the complete rule be?  I know I can do this via .htaccess files in each directory, but I'd rather not have to do that, as there are *many* dirs and subdirs on the server.  

The site is hosted on a VPS and mod_rewrite is installed.  

Thanks in advance for any assistance!
0
Comment
Question by:betagirl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
Tol_cv earned 500 total points
ID: 17080284
RewriteEngine on
RewriteRule ^(.*)\.html$    $1.php  [L,R]
0
 

Author Comment

by:betagirl
ID: 17083081
Hello Tol -

Thank you for your reply.  I need the redirect to be seen as a permanent redirect for search engines, can I add a 301 argument to that it still function properly - ie

RewriteEngine on
RewriteRule ^(.*)\.html$    $1.php  [L,R=301]

Thanks again!
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Curl Multi-exec 13 79
ports for sccm 2012 1 102
Apache,  not running php on top level 14 73
How to access multiple local hosts from phone on network 5 98
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question