Results 1 to 3 of 3
-
11-12-2007, 12:51 PM #1Junior Guru
- Join Date
- Oct 2003
- Posts
- 177
Excluding a subdirectory from htaccess rules?
I recently redesigned my site and as a result, all of my html pages were changed to php. I handled this in htaccess with this:
RedirectMatch 301 (.*)\.html$ http://www.mydomin.com$1.php
However I have a simple forum in a subdirectory which still uses html pages.
How do I make an exception for the html->php rule in htaccess for /forum?
-
11-12-2007, 02:02 PM #2Web Hosting Master
- Join Date
- Jan 2006
- Location
- Athens, Greece
- Posts
- 1,481
Try this one. It means that if the requested file is not found send it to the same filename but with php extension
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)\.html$ /$1.php [L]
-
11-13-2007, 12:05 AM #3Junior Guru
- Join Date
- Oct 2003
- Posts
- 177