RewriteCond %{HTTP_HOST} www.domain.com$ RewriteRule file/file.php$ http://www.otherdomain.com/otherfile/other.php [R=301,L]