I'm struggling with mod_rewrite and .htaccess... All I need to do is make my URLs case in-sensitive. After couple of 500 internal server errors and a lot of googling a lot of stack overflowing I'm just looking for one working solution.
NOT working: Convert to lowercase in a mod_rewrite rule
RewriteMap tolower int:tolower
RewriteRule ^([^/]+)/?$ somedir/${tolower:$1}
NOT working: Case Insensitive URLs with mod_rewrite
CheckSpelling on
All I need is simple not-case sensitive URLs :)
The following should work:
<IfModule mod_rewrite.c>
RewriteEngine on
rewritemap lowercase int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L]
</IfModule>
If not, can you describe what's not working about the proposed solutions?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With