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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

begin:vcard
fn:Spike Burkhardt
n:Burkhardt;Spike
adr;dom:;;3825 Fabian Way;Palo Alto;Ca;94303
email;internet:[EMAIL PROTECTED]
title:Unix Systems Engineer
tel;work:650-852-4787
tel;pager:877-720-8146
x-mozilla-html:TRUE
version:2.1
end:vcard


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to