Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]