I'm currently trying to set up multistores for a magento site on our dev site.
I have two stores, the main store and the french store, with the following domain setup:
main store: main.devsite.com
french store: mainfr.devsite.com
I have a vhost set up for main.devsite.com
. In this vhost, I have set up a serverAlias
for mainfr.devsite.com
.
Then, within the index.php I have the following code snippet.
$serverName = explode('.',$_SERVER['SERVER_NAME']);
if($serverName[0] == "mainfr") {
mage::run("fr", "website");
} else {
Mage::run($mageRunCode, $mageRunType);
}
The problem I have here is that magento seems to automatically redirect mainfr.devsite.net
to main.devsite.net
when Mage::run()
is called.
Is there a way to stop this happening?