I have a Magento website that is moving to a new domain. Im looking to 301 redirect all pages from the old domain to the new domain keeping same url structure.
I've updated the .htaccess file on my old domain with:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^new-domain.com$ [NC]
RewriteRule ^(.*)$ http://new-domain.com/$1 [R=301,L]
The issue: The above seems to redirect every instance of: old-domain.com/subdir/whatever
only just to the main domain: new-domain.com
.
I'd be looking to redirect old-domain.com/subdir/whatever
to: new-domain.com/subdir/whatever
.
Any idea on what could be wrong?