How do I make RewriteCond+RewriteRule change site1.com/folder1 to site2.com/folder1, only if file in this directory don't exist. For example: site1.com/wp-content/uploads/2014/03/image.jpg
If image site1.com/wp-content/uploads/2014/03/image.jpg don't exists, than get site2.com/wp-content/uploads/2014/03/image.jpg But if image exists, don't do anything.
Update, here code what i need, thanks all for help )
Options +FollowSymLinks
RewriteEngine ON
RewriteCond %{REQUEST_URI} "/uploads/"
RewriteCond %{REQUEST_FILENAME} .*\.(jpeg|jpg|gif|png)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.+) http://site2.com/$1 [L,R=301]