httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: Newbie help with <LocationMatch>
Date Fri, 26 Apr 2002 19:34:03 GMT

On 26 Apr 2002, Gary Hennigan wrote:

> I'm trying to restrict access to URLs that have a particular string in
> them and LocationMatch, along with Digest authentication, seemed to be
> exactly what I was looking for. Unfortunately I can't seem to get it
> to work. Here's the entry in my configuration file:
> <LocationMatch "/cgi-bin/viewcvs.cgi/.*cvsroot=Developer.*">

> - - [26/Apr/2002:11:32:42 -0600] "GET /cgi-bin/viewcvs.cgi/Documents/?cvsroot=Developer
HTTP/1.1" 200 1754 "" "Mozilla/5.0
Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020412 Debian/1.2.0-6"

Unfortunately, LocationMatch does not match against the query string
(the part after the ? in the URL).

One possible workaround (untested):
RewriteEngine On
RewriteCond %{QUERY_STRING} cvsroot=Developer
RerwiteRule /cgi-bin/viewcvs.cgi.* - [E=developer]

Order deny,allow
deny from all
allow from env=!developer
require valid-user
satisfy any

That's pretty darn complicated (and I'm not even sure that it works),
but I can't think of a better way to do it.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message