Magento Multi store permanent 301 redirect via .htaccess

290 Views Asked by At

We have a multistore website on Magento.

Website1.co.uk (main)
Website2.co.uk (running)
Website3.co.uk (new)

We want to change website2.co.uk to new domain website3.co.uk using 301 for a permanent redirect.

How can we do this through .htaccess or any other way without losing the traffic on running a website?

Also, website3.co.uk has a new theme. So how will it affect the website2.co.uk view?

RewriteEngine on
RewriteCond %{HTTP_HOST} ^website2.co.uk [NC,OR]
RewriteCond %{HTTP_HOST} ^www.website2.co.uk [NC]
RewriteRule ^(.*)$ http://website3.co.uk/$1 [L,R=301,NC]
1

There are 1 best solutions below

0
On