You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by tc...@cox.net on 2002/11/29 16:52:15 UTC

[users@httpd] Regular Expression matching in Apache 2

I am trying to setup a webdav server on apache2 where I can limit auths to certain directories based on the part of the directory path being equal to the entered username.  I ran across a couple of threads and an Apache 1.3 book explaining to do this by using a DirectoryMatch, and using a "require user $1", the $1 being part of the path that matches, ex.
<DirectoryMatch "/users/([A-Za-z0-9]+)">.
This does not work at all.  Posting an AuthName $1 brings back a $1 on the box, so I am assuming that I am not accessing the $1 correctly.
My question, should this work?  Is there a way to auth like this in apache without repeating the directory statement?  I am authing through ldap, which works fine, but I don't know if this regexp flexibility carried over to apache 2.

Thanks!
Tom



---------------------------------------------------------------------
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