dswafford's picture

Can you Remove File Case Sensetivity?

I am trying to move to Turnkey LAMP from a Windows IIS Webserver.

But I have a problem with the Files Being Case Senstive. Most of the links will not work because of it.
Windows doesn't care about files and what letters you capitalize and linux does.

Is there away I can get around this by applying a filter or patch or anything in apache / Linux? And if yes how?

Hope someone can help.

Forum: 
Alon Swartz's picture

Just to be clear, operating systems are not "per say" case sensitive, but rather the file systems.

Regarding your question, I personally would recommended renaming files/paths to be lower case and replace spaces with underscores, but thats just me. If you have a lot of files and references to those files in your website, a couple liner script would definitely help.

You could always give the Apache module mod_speling a try. I have never used it but according the docs it looks like what you are looking for.
Requests to documents sometimes cannot be served by the core apache server 
because the request was misspelled or miscapitalized. This module addresses 
this problem by trying to find a matching document, even after all other modules
gave up. It does its work by comparing each document name in the requested 
directory against the requested document name without regard to case, and 
allowing up to one misspelling (character insertion / omission / transposition 
or wrong character). A list is built with all document names which were matched
using this strategy.
You can enable it like this:
a2enmod speling
Hope this helps.
dswafford's picture

Thank you for your anwser.

I enabled the module and put in the matching directives but I cant seem to get it to work.
I will mess with it some more and see what happens.

Do you have a refrence article about file systems and them being case sensetive?
I would like to read up about it. Its just the first time I have seen that. Makes sense though.
 

I would appreciate any thing else you might think will help out too.

Thank you for your help,
Darrell

Alon Swartz's picture

As I mentioned before, I have never used that module so I'm sorry I can't be of more help. Keep at it and let us know how it goes...

Wikipedia has a Comparison of file systems article, which shows which filesystems are case-sensitive and which are not.

Good luck!

Add new comment