[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] How to get case-insensitivity for web files?
- Subject: Re: [cobalt-users] How to get case-insensitivity for web files?
- From: Kris Dahl <krislists@xxxxxxxxxxxxx>
- Date: Mon Apr 17 11:49:40 2000
on 4/17/00 11:19 AM, Jeff Lasman at jblists@xxxxxxxxxxxxx wrote:
> David Thacker wrote:
>
>> I'd like web file requests on my RAQ sites to be case insensitive, so a
>> person
>> could request www.site.com/ThisFile.html as well as
>> www.site.com/thisfile.html
>> and get the same file without any trouble.
>>
>> I'm new to the RAQ, and new to Linux and Apache as well. In my previous web
>> server environment (PowerWeb for OS/2), there was simply a server setting to
>> enable or disable case sensitivity, which I preferred to have disabled. Is
>> there an equivalent setting on the RAQ somewhere?
>
> Apache is case insensitive, so if your site is "www.mysite.com" anyone
> can still find it at "www.MySite.Com" or any other variation.
>
> However, Apache simply forwards directory paths and filenames to linux,
> which IS case-sensitive.
>
> For this reason "index.html" must be capitalized exactly as the file is
> listed in the directory. The same thing goes for directory names. If
> your complete url is, for example,
> "httpd://www.yourdomain.com/directory/file.html" then
> "httpd://www.YourDomain.com/directory/file.html" would work, but
> "httpd://www.yourdomain.com/Directory/File.html" would NOT.
>
> No way around it, except to not use Linux/Unix.
Well, unless you want to get really tricky with some apache rewrites. The
overhead would be pretty severe if it had to rewrite each request.
You could also write a perl script that lowercases all filenames and then
apache re-writes to all lowercase names.
But I would highly suggest NOT doing any of those, and use case sensitivity
(it is a better method than case-insensitive), which is the defacto norm for
filesystems.
-k