I found some solutions but none complete or working for me.
So I have a main website, let's call it www.main1.com that has different views translated in different languages: german, italian and english.
What I would like is to redirect the german domain www.germandomain.com to the german view from www.main1.com.
Also I want to keep the views under one website so that the flags can appear in the header.
If you just want a redirect, configure the redirect to go to
1 is the id of the German store view.
If you want the store view to run on the different domain (not just a redirect), you have to:
- point all domains to the Magento document root
- configure the base urls per store view
set the environment variable
MAGE_RUN_CODEdependent on the host name.
SetEnv MAGE_RUN_TYPE store SetEnvIf Host germandomain\.com MAGE_RUN_CODE=german
germanis the store code of the German store view.
configure "Use SID" to "Yes" if the user session should work across domains.