Windows or Mac servers treat file names as case-insensitive, so Index.html and index.html are the same file. In Linux/Unix servers this is not the case, these files would be different. So when we create a link that does not match the case of the file name, you get an error. This is a common problem when moving files from Windows/Mac to a Linux production server and your links include incorrect case.

The ideal solution is to go over the entire site and correct these mismatches. But this may take some time and usually one finds out about the problem when the site has been moved and the domain pointed to the new server, so the problem has to be fixed ASAP.

There is a quick solution thanks to Apache’s mod_speling. If you need Apache to check different versions of a file name requested, you can use CheckCaseOnly and CheckSpelling directives. Adding one of these directives in a .htaccess file in the root directory of your site instantly fixes most of these problems. An example of this configuration is:

CheckSpelling on

We need to note that this method delivers a performance hit. Apache will have to double check each request for spelling when it does not find the file right away. So let it be noted that this is a quick fix; long term it is recommended that you backtrack and correct all the links.