Skip to main content
replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
Source Link

Don't use a different document root for domain1.com and domain2.com. As I understand you, the Magento installation is at domain1/public_html/magento_admin.

Then point the document root for domain2.com to this directory and instead of hard coding MAGE_RUN_CODE in index.php, set it based on the domain, as explained here: Multi Store doesnt work - .htaccess?Multi Store doesnt work - .htaccess?

First of all, you don't need to do any changes in index.php. An example apache configuration that you can add at the top of your .htaccess file is:

SetEnv MAGE_RUN_TYPE website
SetEnvIf Host magento\.zweitedomain\.de MAGE_RUN_CODE=zweitewebsite

(if zweitewebsite is the code of your second website)

I usally don't add the ^ and $ delimiters, so that all subdomains or developer instances are matched as well as long the host contains "magento.zweitedomain.de":

Don't use a different document root for domain1.com and domain2.com. As I understand you, the Magento installation is at domain1/public_html/magento_admin.

Then point the document root for domain2.com to this directory and instead of hard coding MAGE_RUN_CODE in index.php, set it based on the domain, as explained here: Multi Store doesnt work - .htaccess?

First of all, you don't need to do any changes in index.php. An example apache configuration that you can add at the top of your .htaccess file is:

SetEnv MAGE_RUN_TYPE website
SetEnvIf Host magento\.zweitedomain\.de MAGE_RUN_CODE=zweitewebsite

(if zweitewebsite is the code of your second website)

I usally don't add the ^ and $ delimiters, so that all subdomains or developer instances are matched as well as long the host contains "magento.zweitedomain.de":

Don't use a different document root for domain1.com and domain2.com. As I understand you, the Magento installation is at domain1/public_html/magento_admin.

Then point the document root for domain2.com to this directory and instead of hard coding MAGE_RUN_CODE in index.php, set it based on the domain, as explained here: Multi Store doesnt work - .htaccess?

First of all, you don't need to do any changes in index.php. An example apache configuration that you can add at the top of your .htaccess file is:

SetEnv MAGE_RUN_TYPE website
SetEnvIf Host magento\.zweitedomain\.de MAGE_RUN_CODE=zweitewebsite

(if zweitewebsite is the code of your second website)

I usally don't add the ^ and $ delimiters, so that all subdomains or developer instances are matched as well as long the host contains "magento.zweitedomain.de":

Source Link
Fabian Schmengler
  • 66.1k
  • 25
  • 188
  • 422

Don't use a different document root for domain1.com and domain2.com. As I understand you, the Magento installation is at domain1/public_html/magento_admin.

Then point the document root for domain2.com to this directory and instead of hard coding MAGE_RUN_CODE in index.php, set it based on the domain, as explained here: Multi Store doesnt work - .htaccess?

First of all, you don't need to do any changes in index.php. An example apache configuration that you can add at the top of your .htaccess file is:

SetEnv MAGE_RUN_TYPE website
SetEnvIf Host magento\.zweitedomain\.de MAGE_RUN_CODE=zweitewebsite

(if zweitewebsite is the code of your second website)

I usally don't add the ^ and $ delimiters, so that all subdomains or developer instances are matched as well as long the host contains "magento.zweitedomain.de":