I am working on a site. I have all the filenames lowercase, and I want it to not yield a 404 if someone types WHATEVER.php instead of whatever.php. I have tried this in my .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
IndexIgnore *
with this in my httpd.conf
RewriteMap lc int:tolower
The problem is, when I do the URL with upper case letters in it, instead of sending me to the correct page (say, http://www.example.com/example.php), it sends me to the root of the directory my site is hosted on, with the domain in front (say, http://www.example.c...orum/example/). The code for forcing the "www." doesn't seem to be interfering at all (that part works, actually).
What am I doing wrong?
This post has been edited by sak904: 20 April 2012 - 10:58 AM

New Topic/Question
Reply



MultiQuote




|