|
Voracious,
I’m just in the middle of trying the same thing. Here’s where I’ve got to so far…
Catalog->Manage Categories…
... create a new root category for Domain2
System->Manage Stores…
... create a Website for Domain2 (note the ‘Code’ you enter here, as you’ll need it later)
... create a Store for Domain2 (set its root category to the new Domain2 root category)
... create a Store View for Domain2
CMS->Pages…
... add New Page.
...... Title=Domain2 Homepage;
...... URL_Key=domain2_home;
...... Store View=Domain2 Store View (as created above)
... put some Content into the page to identify it.
System->Configuration…
... choose the Domain2 Website from the ‘current configuration scope’ drop-down list
System->Configuration->General->Store Information…
... untick ‘use default’ for Store Name, and enter the Domain2 store name
System->Configuration->General->Web->Unsecure…
... untick ‘use default’ for Base Url, and enter the Domain2 url (eg. http://domain2.com/) - don’t forget the trailing slash!
System->Configuration->General->Web->Secure…
... untick ‘use default’ for Base Url, and enter the Domain2 url (eg. http://domain2.com/ or https:// if you have one)
System->Configuration->General->Web->Default Pages…
... untick ‘use default’ for ‘CMS Home Page’ and select the new page from the drop-down
System->Configuration->General->Web->Session Cookie Management…
... untick ‘use default’ for ‘Cookie Domain’ and enter eg. ‘http://domain2.com’
This has got the Admin side of Magento configured to recognise and use the new domain. Now we need to create the files to make it work when we browse to it…
Copy index.php from the Magento folder on Domain1 to the Magento folder on Domain2
Edit index.php on Domain2…
... on about line 45, change the path to ‘app/Mage.php’
...... e.g. $mageFilename = ‘/var/www/vhosts/Domain1.com/httpdocs/app/Mage.php’;
... just before the last line i.e. Mage::run($mageRunCode, $mageRunType); put…
...... $mageRunCode = ’DOMAIN2 WEBSITE CODE FROM ABOVE‘; $mageRunType = ‘website’;
Okie dokey, that’s what I’ve got set up, and it’s working for me. My ‘domain2’ is a subdomain, and at the moment it has no layout or css showing on it because I haven’t copied the appropriate folders from my Domain1 into Domain2 yet.
The above process wont work for ‘Parked Domains’ though, for them you’ll need to apply one of the other methods as they all try and access the same index.php file.
Hope that helps.
|