Sitecore 重定向规则会丢失网址中的语言代码



我是一名Sitecore开发人员,试图设置重定向规则。 我正在使用
301重定向模块工具,我认为这个概念类似于典型的Sitecore重定向。 在我们的 TEST Sitecore CMS 中,我创建了一个类型为 Redirect Rule 的项目,其Response Status Code设置为 301 Moved Permanent ,它具有以下重定向规则:

where the URL contains Jan2017 replace the static Jan2017 with the static
2017/01

这成功重定向https://test.willistowerswatson.com/de-DE/press/Feb2017/bAV-Reform-BR-Ausschuesse to https://test..willistowerswatson.com/press/2017/02/bAV-改革-BR-澳大利亚

唯一的问题是,为什么语言代码de-DE丢失?

我想在目标URL中维护源URL的语言代码。 我该怎么做?

您是否尝试将语言嵌入属性设置为"始终"?

<linkManager defaultProvider="sitecore">
<providers>
    <clear/>
    <add name="sitecore" ... languageEmbedding="Always" ... />
</providers>

语言嵌入选项包括:

  • 根据需要
  • 总是
  • 从不
将配置更改为使用 languageEmbedding="never" 将阻止语言显示在 URL 中

,同样,languageEmbedding="always" 将强制语言始终显示在 URL 中。

最新更新