This seems like it should be an easy thing to do, but for the life of me I can't figure this out.
I want to force my entire URL to be in lower case, so that, for example:
http://www.EXAMPLE.com/foo?q=bar
http://www.example.com/FOO?q=bar
http://www.example.com/foo?Q=BAR
http://www.EXAMPLE.com/FOO?Q=BAR
all (301) redirect to:
http://www.example.com/foo?q=bar
Adding:
RewriteMap lc int:tolower
to httpd.conf, and:
RewriteEngine on
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [L,R=301]
to .htaccess, I can make the base part of the URL redirect the way I want (the first two cases above), but I can't figure out how to make this work with for the query string. Can anyone point me in the direction of how to do this?