當選擇多語言時,網址中出現 ?___store=cn&___from_store=cn
在多網店設定後,在切換語言的時候,出現一些後綴,例如:llerystores.com/cn/?___store=cn&___from_store=jp這樣容易造成URL混亂和不穩定,容易出現重複頁面,影響seo的工作,所以,要把?後綴去掉去掉也很容易找到文件app/code/core/mage/core/model/store.php的大約1107行(magento 1.7.0.2 版本)左右:
(isset($storeParsedUrl['port']) ? ':' . $storeParsedUrl['port'] : '') $storeParsedUrl['path'] . $requestString ($storeParsedQuery ? '?'.http_build_query($storeParsedQuery, '', '&') : '');
把($storeParsedQuery ? '?'.http_build_query($storeParsedQuery, '', '&') : '')紅色去掉也就是改爲(isset($storeParsedUrl['port']) ? ':' $storeParsedUrl['port'] : '') $storeParsedUrl['path'] . $requestString;
OK,刷新緩存,沒了!
來源:百度搜索到的