Web Hosting Talk







View Full Version : *nix Apache case sensitivity issue


Goni
05-13-2003, 11:34 AM
Hi,
I searched over a couple of forums and some other locations but can't find anything about my query. By default apache is case sEnSatiVe and will recognize index.html and inDex.html as two different files. Now the situation is that we have files from Windows to be hosted over Linux. Windows don't care about the case so it works there, but as we migrate to Linux, it reports broken links.

Is there any solution to fix the problem? I can do rename all the files to lower-case but in that case some HREF's in the files will work and some wont. Have anyone tried something like this before?

Is there any software which updates the links accordingly ?


-Naseer

wKkaY
05-13-2003, 11:43 AM
i think apache's mod_speling (http://httpd.apache.org/docs/mod/mod_speling.html) could help . i havent used it before though :)

Goni
05-13-2003, 11:51 AM
No .. it wont' help .. because it works good for mainly for spellings not the case issue.

rcs
05-13-2003, 11:54 AM
it's not apache that is case sensative, it's unix I wouldn't recommand to use mod_speling for such minor problem.

If you want to change all the files to lowercase, upload them to your linux server and run the follwing command in the directory you uploaded

for i in `ls`
do
mv -f $i `echo $i|tr A-Z a-z`
done

Goni
05-13-2003, 11:58 AM
Originally posted by rcs
it's not apache that is case sensative, it's unix I wouldn't recommand to use mod_speling for such minor problem.

If you want to change all the files to lowercase, upload them to your linux server and run the follwing command in the directory you uploaded

for i in `ls`
do
mv -f $i `echo $i|tr A-Z a-z`
done

I know how to rename files to lowercase and already have done that. But the problem is with the HREF. Some files are called as File.html and some are file.html. If i change the case, the link will be broken. If there anyway through grep/egrep/regex to change the case of the files names itself in the files?

-Naseer

rcs
05-13-2003, 12:03 PM
I can right you a regex if you contact me off list