I have this scenario:
I need to know how to do in apache the redirect from one domain to the other one, taking into accounts that after the .com the page will be the same on both sites
Example User request: http://www.mydomain.com/product1
Should redirect http://www.mydomain2.com/product1
It should be a 301 redirect
I did the following:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
# redirect all requests to www.domain2.com domain
RewriteCond %{HTTP_HOST} =www.domain.com
RewriteRule .* http://www.domain2.com%{REQUEST_URI} [R=301,L]
but its not working, if I go to http://www.domain.com/product1 it redirects to http://www.domain2.com, Always to the homepage.
My guess is that because its a magento multistore installation and both domains are stored on the same magento installation.
This should work: