CheckCase url case senstivity

#1
My webhost is using litespeed and I am facing a problem which makes my script unstable when url's case is changed. Is there an solution to it so that litespeed check the url case and redirect to available directory like CheckCaseOnly string in Apache ?
 

NiteWave

Administrator
#2
for particular URL, you can do it in .htaccess:

RewriteRule aBc.html abc.html [NC]

[NC] mean "no case"

so ABC.html, AbC.html etc all accessible.

or
RewriteRule aBc.html abc.html [NC,R]

all redirect to abc.html, to let user know the correct case.
 
#3
What if I want to make litespeed check for the case url by itself and display the appropriate page ? I want it to be default for whole of the website as CheckCaseOnly in APACHE does.
 

webizen

Well-Known Member
#4
here is a possible workaround:

define RewriteMap in httpd.conf like this:
RewriteMap lowercase int:tolower

put the rule in httpd.conf:
RewriteRule ^/(.*)$ /${lowercase:$1} [L]

or in .htaccess
RewriteRule ^(.*)$ /${lowercase:$1} [L]
 
Top