LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Apache Migration/Compatibility (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=24)
-   -   CheckCase url case senstivity (http://www.litespeedtech.com/support/forum/showthread.php?t=5682)

Aakarshan29 02-06-2012 09:37 PM

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 ?

NiteWave 02-06-2012 10:25 PM

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.

Aakarshan29 02-06-2012 10:50 PM

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 02-07-2012 12:19 PM

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.