httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: cvs commit: apache/src mod_access.c
Date Wed, 09 Oct 1996 12:26:40 GMT
Rob Hartill wrote:
> Re: deny from user-agents
> Ben Laurie wrote:
> >
> >I still don't think we have reached consensus on whether this patch should use
> >BrowserMatch. I am strongly of the opinion that it should. If others agree then
> >this would become an environment variable match instead of a user agent match,
> >and would, therefore, be a considerably more general facility. I'm happy to
> >make the changes... I think! Don't forget that BrowserMatch uses REs, which are
> >much more powerful than strstr, so there is an advantage even in this limited
> >case.
> I haven't looked at BrowserMatch. Can you please explain how it'd work in
> terms of allowing/denying access based on UA and on a per 
> Directory/Location/File basis.

OK. BrowserMatch matches the user agent against an RE, and, if matched, sets
a specified environment variable. The change to allow/deny would be trivial -
instead of matching the user agent, you test for the presence of an environment
variable. As in...

BrowserMatch ^Mozilla/[12] stayaway
deny from env stayaway

or similar.
> If it can cover all the same requirements and have a regexp capability
> then that's great.

I can't see any problem, but I may have missed something.



Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email:
A.L. Digital Ltd,           URL:
London, England.            Apache Group member (

View raw message