mod-ipenv
mod-ipenv is a apache2 module to set/unset environment variables based on client IP addresses or client hostnames.
Get started
The latest release is mod-ipenv-1.0.2. You can get released packages from Download Page. Or you can get the newest codes from the mod-ipenv SVN repository. Visit Sourceforge project home to see the status of this project.
Summary
With mod-ipenv, you can set/unset environment variables based on client IP addresses as follows.
- httpd.conf
SetEnvIp "access/local.conf" LOCAL
- access/local.conf
127.0.0.1 192.168.0.0/24
You can use this variable LOCAL to control accesses, URL rewriting, and so on.
Order allow,deny
Deny from all
Allow from env=LOCAL
RewriteCond %{ENV:LOCAL} .
RewriteRule ^/$ /local/