How to exclude IP from htaccess domain redirect

view story

http://serverfault.com – I'm trying to write a custom redirect rule for some testing purposes on 2 domains with exactly same site. The code Im useing is: RewriteEngine on RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4$ RewriteCond %{HTTP_HOST} ^.*site1.com [NC] RewriteRule ^(.*)$ http://www.site2.com/$1 [R=301,L] What I want is to redirect all requests except IP from site1 to site2. But currently requests from that IP also being redirected to site2. Is there something I've missed in settings? ( note: both domains are on the same shared hosting account ) (HowTos)