0

i m working on admin multisite magento installation which is not having its own frontend. In this installation i have configured 2 websites store and store view.

Admin Magento installation is present on, for eg. domain1.com with directory structure like this . ../public_html/magento_admin

Please Note that Everything works fine when i configure store1 as directory like below

../public_html/magento_admin/store1/ and

access with url http://..../magento_admin/store1

But problem arises when i configure the store1 on different domain for eg. domani2.com and access store1 by url http://domain2.com/

After configuring store1 for domain2.com theme, menus, header, footer is shown correctly, but the cms home page is not showing on the home page. and if i click any category then it tells there is no product for corresponding selected product category. what may be wrong ?

For store1, i have set the skin, media, js to admin url like

.../magento_admin/skin/

.../magento_admin/media/

.../magento_admin/js/

and store1 base url to

...domain2.com/

i have copied the .htaccess and index.php file in root of ....domain2.com/ and have changed following lines in index.php

$mageRunCode = 'store1_code';

$mageRunType = 'website';

What could be the problem ?

1 Answer 1

1

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":

  • www.magento.zweitedomain.de
  • test.magento.zweitedomain.de
  • magento.zweitedomain.de.local

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.