![](/img/trans.png)
[英]magento redirects to another subdomain based on cookie in multistores trick
[英]Magento: Stop domain redirect with multistores
我目前正在嘗試在我們的開發站點上為 magento 站點設置多商店。
我有兩家商店,主要商店和法國商店,具有以下域設置:
總店: main.devsite.com
法國商店: mainfr.devsite.com
我為main.devsite.com
設置了一個虛擬主機。 在這個虛擬主機中,我為mainfr.devsite.com
serverAlias
然后,在 index.php 中,我有以下代碼片段。
$serverName = explode('.',$_SERVER['SERVER_NAME']);
if($serverName[0] == "mainfr") {
mage::run("fr", "website");
} else {
Mage::run($mageRunCode, $mageRunType);
}
我在這里遇到的問題是 magento 似乎在調用Mage::run()
時自動將mainfr.devsite.net
重定向到main.devsite.net
。
有沒有辦法阻止這種情況發生?
您需要在 magento 后端添加商店和網站... 系統 > 管理商店並設置商店的基本網址既安全又不安全? 應該在所有請求都被帶到我認為的默認站點的那一刻工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.