httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dieter Vrancken <dieter.vranc...@mac.com>
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 <jslive@gmail.com> 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
>
>Joshua.

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,
Dieter


---------------------------------------------------------------------
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