Rewrite uppercase URL’s to lowercase
20 October 2008
No Comment
Well today I had to rewrite some URL’s from upper to lower-case letters. Somehow it did not rewrite this automatically. I didn’t figure out the reason why it did not work properly but I found a workaround.
If you have access to the httpd.conf file of the apache server, then simply add the following lines:
<VirtualHost IP:80> stuff here <IfModule mod_rewrite.c> RewriteEngine on rewritemap lowercase int:tolower RewriteCond $1 [A-Z] RewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L] </IfModule>
Now it will redirect the URL’s properly. Yay!
Source
Like our posts? Then subscribe via Mail:
Similar Posts:
- Rewriting “www” to “non-ww” Domain
- HTACCESS: Prevent Hotlinking by Referrer
- Redirect root to folder
- Move Wordpress Blog To A New Host Or Domain
- Deleting your .bash history after logging out
Socialize:
|
|











Leave your response!