Magento: Stop domain redirect with multistores
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 m开发者_JAVA技巧ainfr.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?
you need to add store and website in magento backend ... System > Manage Stores and set your stores' base urls both got secure and insecure? should just work at the moment all request is being taken to the default site I think
精彩评论