Forum Moderators: phranque
I am attempting to rewrite and redirect all upper case request to lower case. I do not have access to HTTPD config and was wondering if there is another way to achieve this w/o using "RewriteMap"
What I have is the following:
RewriteEngine On
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
Thanks
@scottpolk
Be aware that the code is complex and inefficient; Using a RewriteMap defined in httpd.conf (or similar config file) or sending all mis-cased URLs to your script and generating the case-correction redirect from within the script would be a better option.
You will need to read that post in its entirety, and extract the code very carefully to make it work; You'll need both the "set-up" part of the code (which gets several server-defined variables into user-defined variables), and the case-conversion routine itself.
Jim