How to disable case sensitive in URL


#1

HI,
I found the url is case sensitive, and it quite anoying me, like i can visit www.wobuxihuan.org/downloads , but can use : www.wobuxihuan.org/Downloads

How to disable this case sensitive.

Thanks


#2

I am not sure if you made a typo when inputting your query. The two addresses you give are different addresses because the OS of the server system is a nix OS and the filenames of that OS are case sensitive per se. The Windows filenames are not case sensitive so the two addresses would be the same.

The thing to do is to never ever use Uppercase letters or spaces in filenames and you will make things easier for your self. I cannot tell you how many times I have, and still am, caught out by the case sensitivity issue.


Norm

Opinions are my own views and are not the views of DreamHost.
Any advice offered by me should be acted upon only at your own risk.


#3

In direct answer to your question, you can’t. The best you can do is create a softlink, but you cannot create a global “case-insensitive” website.

That’s actually one of the perks I like about Linux. :slight_smile:


yerba# rm -rf /etc
yerba#


#4

If your URLs have some upper case, and you want lower case to work, you’re outta luck.

If your URLs are all lower case, you can use mod_rewrite to convert requests to all lower case:

RewriteEngine on
RewriteBase /
RewriteMap insensitive tolower:
RewriteRule ^[/](.)$ /${insensitive:$1} [R,L]

This is from a kbase entry a while back:
http://blog.dreamhosters.com/kbase/index.cgi?area=1153

-Scott


#5

Thanx