更改sitecore网站默认URL结构

时间:2020-10-28 15:54:33

标签: iis url-rewriting iis-7 sitecore sitecore-sxa

我有一个具有默认URL结构的sitecore网站http:/ /www.domain.com/language/country/abc/xxx / ........由于SEO友好,我们需要在国家/地区之后输入语言,请问是否可以将格式重设为其他格式,例如http:// www。 domain.com/country/language/abc/xxx / ......? 是否可以在iis重写上完成,如果可以的话。 预先感谢

1 个答案:

答案 0 :(得分:0)

我建议您指定语言和国家/地区,以便我可以在参数中对它们进行匹配。

以下是示例供您参考:

<rule name="test" enabled="true" stopProcessing="true">
  <match url=".*" />
   <conditions>
     <add input="{REQUEST_URI}" pattern="^([^/]+)/([^/]+)/(.+)$" />
   </conditions>
  <action type="Redirect" url="http://[www.domain.com]/{C:2}/{C:1}/{C:3}" />
</rule>