Apache environment variables - logical AND
Ian Smith
smithi at nimnet.asn.au
Tue Nov 4 22:33:49 PST 2008
I know this isn't FreeBSD specific - but I am, so crave your indulgence.
Running Apache 1.3.27, using a fairly extensive access.conf to beat off
the most rapacious robots and such, using mostly BrowserMatch[NoCase]
and SetEnvIf to moderate access to several virtual hosts. No problem.
OR conditions are of course straighforward:
SetEnvIf <condition1> somevar
SetEnvIf <condition2> somevar
SetEnvIf <exception1> !somevar
What I can't figure out is how to set a variable3 if and only if both
variable1 AND variable2 are set. Eg:
SetEnvIf Referer "^$" no_referer
SetEnvIf User-Agent "^$" no_browser
I want the equivalent for this (invalid and totally fanciful) match:
SetEnvIf (no_browser AND no_referer) go_away
Any clues?
cheers, Ian
More information about the freebsd-questions
mailing list