2

In what cases does capitilization affect a url? In some cases they seem to be case-sensitive. At other times they don't seem to be case sensitive.

4 Answers 4

7
http://domain.name/path?query=string

Domain names are case insensitive. The path and query string afterwords are case sensitive. So www.yahoo.com and WWW.YAHOO.COM are identical, but wikipedia.org/bash is different from wikipedia.org/Bash.

It is up to the web server to interpret the path portion, so generally speaking Windows web servers might not care what case you use for file names and may allow both index.asp and Index.asp. UNIX web servers generally do distinguish based on case since the underlying file system does. Or if a web site is running custom software to interpret its URLs, like Wikipedia does with its MediaWiki software, then it can do whatever it likes.

3

The web server. Apache is generally case-sensitive, IIS isn't. Others may be or may not be.

2

Domain names are not case sensitive. The rest of the URL technically is, although it doesn't have to be (i.e. some servers may treat uppercase and lowercase URLs the same).

1

The URL (along with querystring data) is sent to the server preserving case, it is dependent on the server to be case sensitive or not. Some (like Apache) are case sensitive, and others (like IIS) are case insensitive by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.