Hi all, please I need help regarding 301 redirect. We have 2 domain names. We have a site running on domain1, but now want the same site, content etc on domain2 instead. We have moved the DB of 1 to 2, so both have exact same content and permalinks.
We want to redirect domain1 to domain2 permanently. But also make sure all Google indexes of 1 is now seen as 2. That means domain1.com/about will be redirected to domain2.com/about - in all cases.
We have tried this code in .htaccess, but it doesnt seem to work. Server is Linux.
Options -Indexes
#Options +FollowSymLinks
#RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain1.com$[OR]
RewriteCond %{HTTP_HOST} ^domain1.com$
RewriteRule ^(.*)$ [
domain2.com...] [R=301,L]
Ps can someone provide us with a code that will do the magic.
Many thanks