rookie with htaccess--I want to redirect all IPs except two... is this right?

Discussion in 'Apache' started by realmuffin, May 20, 2010.

  1. #1
    I found the following code snippet.. it seems to be working for the first ip address but not the second.. do I need an AND? Whats the syntax?

    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{REMOTE_HOST} !^123\.4\.56\.7
    RewriteCond %{REMOTE_HOST} !^98\.7\.65\.432
    RewriteRule \.php$ /tempindex.htm [R=302,L]

    Thanks for any help!! :)
     
    realmuffin, May 20, 2010 IP