我想在商店代码后添加国家/地区名称。例如
The current URL for a category for the dutch store view would be;
http://www.domain.ext/nl/category.html
If the country is set to NL the URL should now be;
http://www.domain.ext/nl_nl/category.html
If the storeview is Dutch (NL) but the country is Belgium (BE), the URL should become;
http://www.domain.ext/nl_bel/category.html
我有国家代码的价值,我想知道如何实现它。任何帮助都非常感谢。
答案 0 :(得分:0)
使用 .htaccess重写规则。
HTH
答案 1 :(得分:0)
// First make a redirect in the Router Controller to new "/nl_nl/" URL, Then:
if(strpos('/nl_nl/', $_SERVER['REQUEST_URI']))
{
$_SERVER['REQUEST_URI'] = $this->getBaseUrl() . '/nl/category.html';
}
这将允许您使用内容为/ nl /
的新网址(/ nl_nl /)