Results 1 to 3 of 3
Feb 7, 2013, 00:32 #1
- Join Date
- Aug 2003
- Seattle, WA USA
- 0 Post(s)
- 0 Thread(s)
case insensitive 301 to same URL?
I searched the topics here and did not see this posted, and haven't found an obvious solution on Google... it is bugging the heck out of me!
I have a situation where there is capitalization in URLs, and people are linking to them with mixed case URLs or people are typing it in the address bar directly.
There are thousands so I need to handle this in some sort of rewrite.
The current URL is http://my.com/Some-Folder/Somefile.htm
But in any number of iterations people are arriving at http://my.com/sOme-fOLder/sOmeFile.htm and getting a 404
The .htaccess is all set up it works great, just this one situation I need to resolve.
I need to detect anything that IS NOT in the exact case of http://my.com/Some-Folder/Somefile.htm and 301 it to that exact case URL.
I have tried RedirectMatch and several RewriteCond/RewriteRule but the closest I have come so far ends in an infinite 301 loop.
Is this something regular expressions could handle, and if so, any hints on what that solution might look like?
Thanks a lot!