Magento - URL 重写以更改语言会出现 404 错误

Magento - URL rewrite to change language gives 404 error

我想翻译 URL 重写的 Magento CMS 页面。当我将同一页面的语言从英语更改为泰语时,出现 404 Not Found 错误。我能够通过以下步骤重现此错误:

  1. 我访问泰语 "Contact Us" 页面 (http://n3mtrading.com/thai/contact-us.html) 没有任何问题。

  2. 当我将语言从泰语切换到英语时,URL 将从 http://n3mtrading.com/default/contact-us.html to http://n3mtrading.com/default/contact-us-eng 重定向,因为我使用了 URL 重写。

  3. 如果我单击语言栏的 link 泰语 (http://n3mtrading.com/thai/contact-us-eng?___from_store=default),我将收到 404 Not Found 错误。

如何解决此 404 Not Found 错误?

您必须为英文商店视图再设置一个 URL 重写:

If from English store view, default/contact-us.html is accessed, please redirect to default/contact-us-eng.html

转到 Catalog/URL 重写管理 > 添加重写 > 自定义
选择 Store 作为英文商店视图
输入任何唯一的 ID 路径
在请求路径中输入default/contact-us.html
在目标路径中输入default/contact-us-eng.html
重定向 -