hi to all,
i have a problem with a rewrite rule and i can't find a way to solve it..
i need to match the requests with an upper case letter in the first part of the request_uri and to rewrite only this part with lowercase letters
example:
http://www.mydomain.com/dir1/file1.html -> no rewrite
http://www.mydomain.com/dir1/File1.html -> no rewrite
http://www.mydomain.com/diR1/file1.html -> http://www.mydomain.com/dir1/file1.html
http://www.mydomain.com/diR1/fiLe1.html -> http://www.mydomain.com/dir1/fiLe1.html
this is the rule i "think" should work.. but it doesn't:
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} ^/([A-Z])/(.*)
RewriteRule (.*) /${lc:$1}/$2 [R=301]
thanks in advance