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

Advertisements

One comment on “Set up Magento multiple website in IIS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s