If you ever have the need to move domain names, the following .htaccess code will help move all visitors to your second domain name. This method also preserves your URLs’ query string variables, so there’s a less likely chance of something breaking.

You can use this:

RewriteEngine On
RewriteCond %{HTTP_HOST} firstdomain.com$
RewriteRule ^(.*)$ http://www.seconddomain.net/$1 [L,R=301]

Similar Posts: