httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] multicriteria "Deny from env" rule
Date Thu, 08 Jun 2006 13:21:03 GMT
On 6/8/06, Proniewski Patrick <patrick.proniewski@univ-lyon2.fr> wrote:
> Hello,
>
> I'm trying to set up a deny rule that must be triggered only when 2
> conditions are both true :
>
>         BrowserMatch "^$" BlockBrowser
>         SetEnvIf Referer "^$" BlockReferer
>         SetEnvIf GEOIP_COUNTRY_CODE XX BlockCountry
>
>         <LimitExcept GET>
>            Deny from env....(BlockBrowser AND BlockReferer)
>            Deny from env=BlockCountry
>         </LimitExcept>
>
> I'm using Apache 2.0.5x
>
> Any idea how I can write my "Deny" rule that uses both BlockBrowser AND
> BlockReferer ?

BrowserMatch "^$" BlockBrowser=1
SetEnvIf Referer "^$" BlockReferer=1
SetEnvIf BlockBrowser ^1$ GoAway
SetEnvIf BlockReferer ^1$ GoAway
Deny from env=GoAway

But it would be easier just to set the GoAway variable in the original
BrowserMatch/SetEnvIf if you don't need those specific variables
elsewhere.

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


Mime
View raw message