case-insensitive file system with Apache being case-sensitive.

case-insensitive file system with Apache being case-sensitive.

Post by Maxime Paquett » Wed, 26 Jul 2000 04:00:00



Hi,
    does anybody know if I can change Apache from being case-sensitive?
The problem is that I've made a web site with a protected area, when I enter
the URL www.mysite.com/protected , I need to enter a password, but if I
enter www.mysite.com/Protected or www.mysite.com/proTected I enter the web
site without bieng prompt to enter a password.

    The only way I figured out is to configure Apache for all the
possibility, like: protected, Protected, PRotected, etc....

Any help will be appreciated.

Thanks.

--
Maxime Paquette

Scripto Centris Inc.
1030 Beaubien Est #103
Montreal, Quebec
H2S 1T4
(514) 277-6148
--

 
 
 

case-insensitive file system with Apache being case-sensitive.

Post by Joshua Sliv » Wed, 26 Jul 2000 04:00:00



> Hi,
>     does anybody know if I can change Apache from being case-sensitive?
> The problem is that I've made a web site with a protected area, when I enter
> the URL www.mysite.com/protected , I need to enter a password, but if I
> enter www.mysite.com/Protected or www.mysite.com/proTected I enter the web
> site without bieng prompt to enter a password.
>     The only way I figured out is to configure Apache for all the
> possibility, like: protected, Protected, PRotected, etc....

You cannot make apache case-insensitive because the web is
case-sensitive.  URLs are defined to be case sensitive by the relevant
RFCs.  You have not really provided enough information to solve your
problem.  What is /protected?  If it is a directory, then you should
be using a <Directory> section to protect it, not a <Location>
section.  Otherwise, you should use whatever rewriting tools that
define this URL to ensure that only one case works and the rest result
in 404s or redirections to the correct URL.

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/

 
 
 

case-insensitive file system with Apache being case-sensitive.

Post by Alan J. Flavel » Wed, 26 Jul 2000 04:00:00



>     does anybody know if I can change Apache from being case-sensitive?

Irrelevant.  URLs are case-sensitive _by_definition_.

If you want to mess up the web by hiding that fact, there are various
ways of getting it wrong (redirection, aliases, rewriting...) and no
ways of getting it right.

Quote:> The problem is that I've made a web site with a protected area, when I enter
> the URL www.mysite.com/protected , I need to enter a password, but if I
> enter www.mysite.com/Protected or www.mysite.com/proTected I enter the web
> site without bieng prompt to enter a password.

Quite right too.

good luck

 
 
 

case-insensitive file system with Apache being case-sensitive.

Post by Maxime Paquett » Thu, 27 Jul 2000 04:00:00


Quote:> > Hi,
> >     does anybody know if I can change Apache from being case-sensitive?
> > The problem is that I've made a web site with a protected area, when I
enter
> > the URL www.mysite.com/protected , I need to enter a password, but if I
> > enter www.mysite.com/Protected or www.mysite.com/proTected I enter the
web
> > site without bieng prompt to enter a password.

> >     The only way I figured out is to configure Apache for all the
> > possibility, like: protected, Protected, PRotected, etc....

> You cannot make apache case-insensitive because the web is
> case-sensitive.  URLs are defined to be case sensitive by the relevant
> RFCs.  You have not really provided enough information to solve your
> problem.  What is /protected?  If it is a directory, then you should
> be using a <Directory> section to protect it, not a <Location>
> section.

Here's what I've writen in my apache.conf file:

<Directory "/adirectory/WebServer/MySite/protected">
    AuthType Basic
    AuthName "My Realm"
    AthUserFile /adirectory/WebServer/userfile
    require valid-user
</Directory>

and for apache, "/adirectory/WebServer/MySite/protected" is protected but
not "/adirectory/WebServer/MySite/Protected"
but for my file system those two are the same.

Otherwise, you should use whatever rewriting tools that

> define this URL to ensure that only one case works and the rest result
> in 404s or redirections to the correct URL.

> --
> Joshua Slive

> http://finance.commerce.ubc.ca/~slive/

Do you know where I can find such a tool?

Thanks.

Maxime Paquette

 
 
 

case-insensitive file system with Apache being case-sensitive.

Post by Joshua Sliv » Thu, 27 Jul 2000 04:00:00


[...]

Quote:>> problem.  What is /protected?  If it is a directory, then you should
>> be using a <Directory> section to protect it, not a <Location>
>> section.
> Here's what I've writen in my apache.conf file:
> <Directory "/adirectory/WebServer/MySite/protected">
>     AuthType Basic
>     AuthName "My Realm"
>     AthUserFile /adirectory/WebServer/userfile
>     require valid-user
> </Directory>
> and for apache, "/adirectory/WebServer/MySite/protected" is protected but
> not "/adirectory/WebServer/MySite/Protected"
> but for my file system those two are the same.

Hmmm, this is more serious.  What operating system is this?  What
filesystem?  I believe that Apache is designed to work only with case
sensitive filesystems under unix.  (Under windows and some other
systems it will work properly with case insensitive filesystems.)
I believe someone (W. Sanchez?) was working on the problem of
handling both types of filesystems because Mac OS X will have this
problem.

Quote:> Otherwise, you should use whatever rewriting tools that
>> define this URL to ensure that only one case works and the rest result
>> in 404s or redirections to the correct URL.
> Do you know where I can find such a tool?

One guess (untested):
Rewri*gine On
RewriteCond %{SCRIPT_URL} ^/protected(.*) [NC]
RewriteCond %{SCRIPT_URL} !^/protected.*
RewriteRule .* /protected%1 [R,L]

--
Joshua Slive

http://www.veryComputer.com/~slive/

 
 
 

case-insensitive file system with Apache being case-sensitive.

Post by Maxime Paquett » Sat, 29 Jul 2000 04:00:00


Quote:> Hmmm, this is more serious.  What operating system is this?  What
> filesystem?  I believe that Apache is designed to work only with case
> sensitive filesystems under unix.  (Under windows and some other
> systems it will work properly with case insensitive filesystems.)
> I believe someone (W. Sanchez?) was working on the problem of
> handling both types of filesystems because Mac OS X will have this
> problem.

I use Mac OS X.

> > Otherwise, you should use whatever rewriting tools that
> >> define this URL to ensure that only one case works and the rest result
> >> in 404s or redirections to the correct URL.

> > Do you know where I can find such a tool?

> One guess (untested):
> Rewri*gine On
> RewriteCond %{SCRIPT_URL} ^/protected(.*) [NC]
> RewriteCond %{SCRIPT_URL} !^/protected.*
> RewriteRule .* /protected%1 [R,L]

> --
> Joshua Slive

> http://www.veryComputer.com/~slive/

sorry, but I don't know what you mean by the 4 lines above, I'm not advaced
enought.  I've just started to use Mac OS X and Apache.  I know a little of
Linux, but that's all.

Maxime Paquette

 
 
 

case-insensitive file system with Apache being case-sensitive.

Post by Joshua Sliv » Sat, 29 Jul 2000 04:00:00



>> Hmmm, this is more serious.  What operating system is this?  What
>> filesystem?  I believe that Apache is designed to work only with case
>> sensitive filesystems under unix.  (Under windows and some other
>> systems it will work properly with case insensitive filesystems.)
>> I believe someone (W. Sanchez?) was working on the problem of
>> handling both types of filesystems because Mac OS X will have this
>> problem.

> I use Mac OS X.

I don't know how this is supposed to work.  You might want to
ask the person who did the port: Wilfredo Sanchez:
wsanchez AT apache.org

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/