![]() |
CheckCase url case senstivity
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 ?
|
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. |
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.
|
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] |
| All times are GMT -7. The time now is 05:42 AM. |