Reputation: 5168
I'm trying to create multiple websites, so that I can have multiple currencies and each with its own payment gateway. The trouble is, how to I access the other website?
After setting up one website everything works fine. I add another one and use a different domain for "Base URL" for it, but when trying to access that URL (which on the backend is routed by Apache to a directory which is just a symlink to same old magento code) - magento just redirects me to the old URL. How do I make the other website visible?
Upvotes: 1
Views: 3203
Reputation: 66
There are comprehensive entries in the Magento Wiki and Knowledge Base:
http://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup
and
If possible, you should use the VHOST approach from the second link, then the .htaccess if you can't edit the web server config. Of course if you are using NGINX then you will have to use the VHOST approach adapted for NGINX.
Upvotes: 0
Reputation: 5410
It is meant to be done via the .htaccess file. You should add the following code at the bottom:
# domain1.com
SetEnvIf Host domain1\.com MAGE_RUN_CODE=domain1
SetEnvIf Host domain1\.com MAGE_RUN_TYPE=website
# domain2.com
SetEnvIf Host domain2\.com MAGE_RUN_CODE=domain2
SetEnvIf Host domain2\.com MAGE_RUN_TYPE=website
The MAGE_RUN_CODE must correspond to the website code you have entered in the Magento backoffice when creating that website.
Upvotes: 4