marcus0263
Joined: 21 Jul 2008
Posts: 171
Location: Seattle
|
| Posted: Wed Sep 02, 2009 4:03 pm Post subject: Incoming redirects by network range |
|
|
I wanna redirect incoming networks, not just specific IP's with Apache, would this be correct?
Code: RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^192\.168\.0\.0$
RewriteRule .* http://www.google.com |
|
fukawi2
Joined: 02 Feb 2009
Posts: 64
Location: Melbourne, Australia
|
| Posted: Wed Sep 02, 2009 6:28 pm Post subject: Re: Incoming redirects by network range |
|
|
I think it would need to be more along the lines of the following since it's a regex comparison, and Apache isn't aware of the CIDR / network address in this module.
Code: RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^192\.168\.0\.[0-9]{1,3}$
RewriteRule .* http://www.google.com |
|