Pages

Tuesday 18 June 2013

Set up multy domain and multi store website in magento

Simply add this code in index.php and change your adons name and store name in that file.


<?php
 $x= $_SERVER['HTTP_HOST'];
  
switch ($x)
{
case 'celluvati.com':
 Mage::run("celluvati","store");
  break;
case 'www.celluvati.com':
 Mage::run("celluvati","store");
  break;
  case 'http://www.celluvati.com':
 Mage::run("celluvati","store");
  break;
  case 'https://www.celluvati.com':
 Mage::run("celluvati","store");
  break;


case 'wbscience.com':
  Mage::run("wbscience","store");
  break;
  case 'www.wbscience.com':
  Mage::run("wbscience","store");
  break;
  case 'http://www.wbscience.com':
  Mage::run("wbscience","store");
  break;
  case 'https://www.wbscience.com':
  Mage::run("wbscience","store");
  break;

 case 'willowdalebotanicalscience.com':
  Mage::run("default","store");
  break;
  case 'www.willowdalebotanicalscience.com':
  Mage::run("default","store");
  break;
  case 'http://www.willowdalebotanicalscience.com':
  Mage::run("default","store");
  break;
  case 'https://www.willowdalebotanicalscience.com':
  Mage::run("default","store");
  break;

default:
 Mage::run("default","store");
}



?>

No comments:

Post a Comment