Forum Moderators: phranque
I am having a problem I have this in my httpd.conf file:
<Directory />
Options FollowSymLinks
AllowOverride None
RewriteEngine On
RewriteRule ^(.*)\.html$ $1.php
</Directory>
I have a sub directory that has an actual .html file. When I try to pull up this .html file it will use the mod_rewrite rule and look for a php file. How do I turn it off for this sub directory?
Thanks in advance for your help :)
Wes
# Execute rule only if requested URL is not the specific .html file
RewriteCond %{REQUEST_URI} !^/URL_path_to_specific/file\.html$
# Execute rule only if requested filename does not exist
RewriteCond %{REQUEST_FILENAME} !-f
Jim
It doesn't seem to work.
This is my mod_rewrite info in my httpd.conf file:
<Directory />
Options FollowSymLinks
AllowOverride None
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule /(.*)/(.*)/(.*)/(.*)/index\.html listing.php?input=$4
RewriteRule /(.*)/(.*)/(.*)/index\.html listing.php?input=$3
RewriteRule /(.*)/(.*)/index\.html listing.php?input=$2
RewriteRule /(.*)/index\.html listing.php?input=$1
RewriteRule ^(.*)\.html$ $1.php
</Directory>
Now one other thing I noticed when search google is that I should stay away from *'s is this true? If so I would have to change it to ([0-9A-Za-z]+) correct?
Thanks again for your help.
Wes