Knowledgebase: Web Hosting Related
How do I make my case sensitive URLs case insensitive?
Posted by Support on 12 January 2015 12:08 PM

Our linux hosting servers are a case-sensitive file system. In other words, file.html and File.html are not the same file. This is different from Microsoft Windows, which does not have a case-sensitive file system. On Microsoft Windows, file.html, File.html, FILE.HTML, and FiLe.Html all refer to the same file.

These file handling differences can cause problems, particularly when:
- You migrate a web site from Microsoft IIS (Internet Information Services) to Linux.
- You use an application to design a web site on Microsoft Windows, and then publish the files to a Linux web server.

You can use the Apache web server's mod_speling module to work around these issues. (The module's name is intentionally misspelled with only one 'l'.) With the mod_speling module, you can instruct Apache to ignore filename case. This saves you the effort of having to manually rename files and edit HTML hyperlinks so they all use the correct case. To set up the mod_speling module, follow the procedure below.


1. Create a file called .htaccess in the folder where you want case insensitive URLs, or edit the .htaccess file if it already exists and add the following to the bottom of the file:
<IfModule mod_speling.c>
CheckSpelling on
CheckCaseOnly on
</IfModule>

(27 vote(s))
Helpful
Not helpful