httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Spike Burkhardt <burkhardt.rich...@ssd.loral.com>
Subject Re: [users@httpd] Trouble with regexp on <Directory>, using Apache 1.3.33
Date Wed, 24 Aug 2005 21:20:35 GMT
Martijn,

  Maybe I'm missing something, but in this case wouldn't using .htaccess 
be a good approach?

spike

Martijn wrote:

> Hello everyone,
>
> I've been trying to solve this for the last 2 days, but somehow I'm 
> unable to see the logic here. Hope anyone can help me explain what's 
> going on:
>
> I've got a few directories, lets say they're named A, B, C and D.
> Two of these (A and B) need to be restricted.
>
> I figured that this should be done by the following regexp:
> <Directory ~ "/home/websites/(A|B)">
>
> To my knowledge, this should match /home/websites/A or /home/websites/B .
> Instead, Apache matches everything in /home/websites and blocks access 
> to C and D as well.
>
> Strange, since a very similar regexp is shown in the apache 1.3 
> documentation:
> http://httpd.apache.org/docs/1.3/mod/core.html#location
>
> I also tried using (A|B)/? and several ways of matching the start and 
> end of the string using ^ and $ , but to no effect.
>
> In an attempt to isolate the problem, I tried something else:
> <Directory ~ "(/home/websites/A|/home/websites/B)">
> But strangely, this DOES match A but NOT B, so now I'm confused.
> I've checked the path and I'm sure there are no mistakes there.
>
> If I'm not using a regexp, eg. <Directory "/home/websites/A"> (or B), 
> everything works like it should, so my guess would be that the 
> contents of the directory-directive are right, only the regexp is the 
> problem.
>
> What am I missing here?
>
> Thanks in advance,
> Martijn.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Mime
View raw message