LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   is it possible to make apache2 non-case sensitive (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-make-apache2-non-case-sensitive-343459/)

snip128 07-15-2005 10:03 AM

is it possible to make apache2 non-case sensitive
 
yea, i need apache to not be case-sensitive with the file names...im trying to use a script (.asp file) to list the contents of a directory, but when i click on a link it says its not found...because...the script displays everything in lowercase...so...if there is....please tell me =)

thx in advance (it might take me a while to reply, i won't have internet for a few days...)

edit: also...quick question...should be easy...how do you change the default file it loads? (i.e. index.html)

rjlee 07-15-2005 05:00 PM

Re: is it possible to make apache2 non-case sensitive
 
Quote:

Originally posted by snip128
yea, i need apache to not be case-sensitive with the file names...im trying to use a script (.asp file) to list the contents of a directory, but when i click on a link it says its not found...because...the script displays everything in lowercase...so...if there is....please tell me =)

thx in advance (it might take me a while to reply, i won't have internet for a few days...)

Apache is case-sensitive, but it just passes the request onto the filesystem. You could try using a case-insensitive filesystem like VFAT to store your scripts.

mod_rewrite can translate filenames using something like a Perl script; something like. For this you'll need all filenames to be in lower-case. See the mod_rewrite file, but here's a complete Perl script you can use to do this:
Code:

#!/usr/bin/perl -n -e 'print lc $_'
Google says you can also use a Samba server to make a fully case-insensitive server: http://linux.omnipotent.net/article....ticle_id=11710

By the way, the URI specification says that URLs are case-sensitive, except for the machine-name part. One issue you might see with this is that http://machine/path/to/file.html and http://machine/path/to/File.html will be cached seperately by proxies, which could make things inefficient and result in your server taking more hits than it needs. This doesn't usually apply to scripts with dynamic content, because these are usually re-fetched anyway.

Quote:

edit: also...quick question...should be easy...how do you change the default file it loads? (i.e. index.html)
See http://httpd.apache.org/docs/mod/mod...directoryindex


All times are GMT -5. The time now is 03:11 AM.