Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are file extensions case-sensitive on the web but not on localhost?

So I was trying to link an image on my website as <img src="cat.png alt="cat"/> and for some reason it wasn't working. I later found out that when uploaded to my server the file was labeled as "cat.PNG" so I inputted that and it fixed. However, when I was testing my site on localhost, it was fine. Why is this? Is this some security issue or is localhost just smarter when it comes to parsing files?

I know this is a weird and random question but I am curious. Thanks.

like image 432
aug Avatar asked Feb 19 '13 02:02

aug


1 Answers

That depends on the operating system. Your server seems to run Linux which is normally case sensitive and if you run Windows on localhost it's not.

like image 139
Christoph Lütjen Avatar answered Dec 31 '22 20:12

Christoph Lütjen