On 8/24/05, Martijn <users.apache@xxxxxxxxxxxxxxxxx> 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)"> Well, I'm not sure why this doesn't work, but you shouldn't even need a regex for that. You should be able to do <Directory /home/websites/[AB]/> using shell-style wildcard character classes. See: http://httpd.apache.org/docs/2.0/sections.html#file-and-web which is for a more modern version of the server but should still apply to 1.3. Joshua. > > 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@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx