• Resolved Pierrick

    (@artpie)


    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

Viewing 1 replies (of 1 total)
  • https://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 (.*) https://www.example.com/$1 [R=301,L]
    #
    # Skip to here if no uppercase letters in client-requested URL.
    # <some other rules>
Viewing 1 replies (of 1 total)
  • The topic ‘301 redirect from upper case to lower case. Possible?’ is closed to new replies.