RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^oldsite\.com$ [NC] RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]