I have a Magento store http://handicrafts.com.pk and using the same installation of Magento I wanted to add another store(http://gemstones.com.pk ) to it.
I have a godaddy hosting so what i did, i added gemtones.com.pk on the top of handicrafts domain, you can say a kind of a addon domain as gemstones.com.pk was also pointing to the same folder containing handicrafts files that is
/webmaestros/handicrafts
By now i had both folders pointing to the same folder containing Magento files.
By going to Magento Admin > Catalog > Manage Categories, i renamed the Default Category to handicrafts.com.pk and added another root category gemstones.com.pk
Now by going to System > Manage Stores
Edited the default Website name to Handicrafts, Code for default website is base. Then edited the Default Store and changed the name to Handicrafts and changed the Root Category from the dropdown menu to handicrafts.com.pk. And finally edited the Default store view and changed its name to Handicrafts Store View, for the code i added handicrafts_en and set the status to Enabled.
Now was turn to add website, store and store view for the second domain gemstones.com.pk
Simply clicked Add website and added name ‘gemstones’ and for the code gemstones as well. Then clicked the Add store button and added name ‘gemstones’ and for the Root Category selected ‘gemstones.com.pk’ from the drop down menu.’ Lastly added the Store View and added the name ‘gemstones store view’, for the code added ‘gemstones_en’ and changed status to Enabled from the drop down and then clicked Save Store View
Then by going to System > Configuration,>Current Configuration Scope (located on the top left), change the dropdown menu from Default Config to handicrafts store view
Selected Web from the sidebar on the left under the General heading and for both the Unsecure and Secure sections, unchecked the Use default box next to the Base URL item, and entered the URL http://www.handicrafts.com.pk/
Then edited System -> Configuration -> Gemstones Store View -> Web tab and :
set {Base URL} to your http://www.handicrafts.com.pk/
set {Base Link URL} to your http://www.gemstones.com.pk/
Last step was to edit the index.php file
Replaced
Mage::run(); with this code in index.php
switch($_SERVER['HTTP_HOST']) {
case ‘gemstones.com.pk’:
case ‘www.gemstones.com.pk’:
Mage::run(’gemstones’, ‘website’);
break;
default:
Mage::run();
break;
}
Thats it!