htaccess rewrite to other domain

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

Leave a Reply

Your email address will not be published. Required fields are marked *