This method has been covered elsewhere, but it’s certainly worth mentioning for developers looking for a multi-domain website but are stuck with a now ancient-looking Magento 1.3. My previous post about multiple domains on 1.4+ uses the .htaccess method of detecting the URL and running the correct website. On 1.3 however, this is not possible so you have to use PHP and modify the index.php file – see the comparison diagram below, which demonstrates the different ways stores are loaded in Magento between 1.3 and 1.4.

At the bottom of the file where the script calls Mage::run(); simply replace this with the following switch statement:
// Assign the website URL$site = $_SERVER['HTTP_HOST'];switch ($site) {case 'www.myseconddomain.co.uk':Mage::run('domaintwo', 'website');break; default: Mage::run(); }You can obviously insert as many cases as needed into the switch.
The next step is to ensure all cache is cleared otherwise your second site might not work. There’s a file called use_cache.ser in the following location which needs to be deleted:
app/etc/use_cache.ser
Magento will create a new one with the correct permissions once deleted. For developers working with Magento installations of version 1.4 and above, read this tutorial instead.
Thanks for reading the Magento Blog at E-commerce Website Design.
Adam Moss Author Page
Looking for this topic and got you thanks for sharing with world keep them coming..
Trả lờiXóaMagento Modules