How to disable case sensitive in URL


I found the url is case sensitive, and it quite anoying me, like i can visit , but can use :

How to disable this case sensitive.



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.


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.


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


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: