views:

231

answers:

1

I got a code that will match a certain block of IP and redirect them to another page.

RewriteCond %{REMOTE_ADDR} ^192\.168\.10\..*
RewriteRule ^/support http://www.yahoo.com/gone [R,NE,NC]

However, how would I reverse this? to only allow one IP and redirect the rest to a certain url?

+1  A: 

Try this

RewriteCond %{REMOTE_ADDR} ^!192\.168\.10\..*
RewriteRule ^/support http://www.yahoo.com/gone [R,NE,NC]
martin.malek
Shouldn't it be?RewriteCond %{REMOTE_ADDR} !^192\.168\.10\..*
Louie Miranda