httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
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.*">

> 134.xxx.xxx.xx - - [26/Apr/2002:11:32:42 -0600] "GET /cgi-bin/viewcvs.cgi/Documents/?cvsroot=Developer
HTTP/1.1" 200 1754 "http://thehost.sandia.gov/cgi-bin/viewcvs.cgi/?cvsroot=Developer" "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.

Joshua.



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message