Hi All,
Is it possible to implement a 301 redirect from upper case to lower case URLs? And if it is I presume that the htaccess file need to be edited?
Thanks for your help
P
Hi All,
Is it possible to implement a 301 redirect from upper case to lower case URLs? And if it is I presume that the htaccess file need to be edited?
Thanks for your help
P
http://www.webmasterworld.com/forum92/958.htm
Options +FollowSymLinks
RewriteEngine on
# If the URI does not contain any uppercase letters, skip the next 28 rules.
RewriteRule ![A-Z] - [S=28]
#
# Else convert the first instance of "A" to "a", "B" to "b", etc.
RewriteRule ([^A]*)A(.*) $1a$2
RewriteRule ([^B]*)B(.*) $1b$2
# <22 more rules>
RewriteRule ([^Y]*)Y(.*) $1y$2
RewriteRule ([^Z]*)Z(.*) $1z$2
#
# If any more uppercase characters remain, restart mod_rewrite from the top
RewriteRule [A-Z] - [PT,N]
# Otherwise do an external 301 redirect to give the client the new URL.
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
#
# Skip to here if no uppercase letters in client-requested URL.
# <some other rules>This topic has been closed to new replies.