URL’s are case sensitive

By | May 5, 2010

I’ve been in web development for at least 10 years now but I must admit that there are still some small stuff that I don’t know, one particular example is URL’s are case sensitive, what a shame I just discovered it recently when we had an issue with links on emails. Since I am using Windows Platform 90% (IIS) of the time then it was not an issue with me before as Windows host are case insensitive, unlike the Linux or Unix counterpart it is case sensitive.

To further explain if you have a webpage hosted on “www.sample.com” under the folder “MyFolder” and the file is called “MyWebPage.html” then the URL would be:

http://www.sample.com/MyFolder/MyWebPage.html

then whether its

http://www.sample.com/myfolder/mywebpage.html or

HTTP://WWW.SAMPLE.COM/MYFOLDER/MYWEBPAGE.HTML

if its hosted on a Windows Environment then it would resolve

but if its hosted in Linux or Unix it would not resolve and you will get a 404 Error you always need to use the correct case like

http://www.sample.com/MyFolder/MyWebPage.html as the URL.

To add notes to this post, take note that domain names are not case sensitive only the files and folders. So if you type http://WWW.SAMPLE.COM/MyFolder/MyWebPage.html it doesn’t matter, anyways if you use Firefox 3.6 or IE 7 or 8 if you type WWW.SAMPLE.COM those browsers will force to lowercase but only that part, not sure about the old versions.

So one good tip when you are developing web applications don’t use camel case or use any uppercase characters as a part of the whole URL as most of the internet users use small case when typing the address.

Recommended

One thought on “URL’s are case sensitive

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.