0

我是Sitecore開發人員嘗試設置重定向規則。我正在使用
301 Redirect Module 工具,我認爲這個概念與典型的Sitecore重定向類似。在我們的測試Sitecore CMS,我創建了Redirect Rule類型的項目,具有Response Status Code設置爲301 Moved Permanent,它具有以下的重定向規則:Sitecore重定向規則在URL中丟失語言代碼

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-Ausschuessehttps://test..willistowerswatson.com/press/2017/02/bAV-Reform-BR-Ausschuesse

唯一的問題是,爲什麼語言代碼de-DE丟失?

我想說保證源URL的語言代碼在目的地URL。我怎樣才能做到這一點?

回答

0

您是否嘗試將languageEmbedding屬性設置爲'always'?

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

的languageEmbedding選項有:

  • ASNEEDED
  • 總是
  • 從未

更改配置使用languageEmbedding = 「從不」 將停止顯示,語言在URL中,同樣languageEmbedding =「always」會強制語言t o始終顯示在URL中。