我是一名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="always" 将强制语言始终显示在 URL 中。