httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dieter Vrancken <>
Subject [users@httpd] SOLVED: Allow from - requiring both a http header and an IP range
Date Thu, 21 Jul 2005 08:26:10 GMT
On Wednesday, July 20, 2005, at 05:30PM, Joshua Slive <> wrote:
>This can, in fact, be done using mod_setenvif using something like
>SetEnvIf Remote_Addr .* goodadd=0
>SetEnvIf Remote_Addr ^xxx\.yyy\.zzz goodadd=1
>SetEnvIf X-Magic magic_value letmein
>SetEnv goodadd 0 !letmein
>Allow from env=letmein

An excellent solution Johsua! I didn't realize you can also disable environment
variables. I did have to replace the last SetEnv with a SetEnvIf (otherwise the
arguments wouldn't make sense).

I'm not going to bother with mod_rewrite for something that can be solved much
more clearly this way.

Thanks again,

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

View raw message