iisurl-rewritingiis-7sitecoresitecore-sxa

changing sitecore website default URL structure


I have a sitecore website with a default URL structure http:/ /www.domain.com/language/country/abc/xxx/........ due to SEO friendly we need to have language after country,Any idea if I can reset the format to something else,like http: //www. domain.com/country/language/abc/xxx/......? can this be done on iis rewrite,if yes how. thanks in advance


Solution

  • I suggest you specify your language and country so That I can match them in parameters.

    Here is a sample for your referenceļ¼š

    <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>