Set up Magento multiple website in IIS
1. Install Magento in IIS
2. Create another website in IIS, set physical path to the previously installed Magento root folder
3. Give iis application pool identity for the new site permission to the physical path folder
4. Change anonymous user identity to “application pool identify”.
5. Create Root Catelog for the new website
go “Catelog” –> “Manage Categories” –> “Add Root Category“
6. Create Website, Store and Store view for the new domain
go “System” –> “Manage Stores”, use the previously created root category for the new store
7. Configure website URL
go “System” –> “Configuration” –> change “Current Configuration Scope” to the new create website
select “Web” –> “Unsecure” –> untick “Use Default” besides “Base URL” –> update “Base Url” field
select “Web” –> “Secure” –> untick “Use Default” besides “Base URL” –> update “Base Url” field
8. Edit index.php file in Magento root folder (It is meant to be done via the .htaccess file, but IIS does not read/use .htaccess file.)
Comment out this line of code (last line) “/* Mage::run($mageRunCode, $mageRunType); */“
Add the following lines of code right below the commented out line
switch($_SERVER['HTTP_HOST']) {
case ‘www.domain1.com’ :
Mage::run(‘mainsite’, ‘website’);
break;
case ‘www.domain2.com’ :
Mage::run(‘anothersite’, ‘website’);
break;
default:
Mage::run();
}
9. Set up home page, catelog menu, footer for the new website
Filed under: eCommerce Tagged: Magento

This was originally posted here.
*This post is locked for comments