IIS URL rewrite module for removing Trailing Slash From the URLs do not work in CMS edit mode, page collapses and show error "too many redirects".
Add below rewrite rule for trailing-slash in web config.
<rewrite><rules>
<rule name="Remove trailing slash" stopProcessing="true">
<match url="(.*)/$"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
<add input="{URL}" matchType="Pattern" pattern="(.*)(EPiServer)(.*)" ignoreCase="true" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="{R:1}"/>
</rule>
</rules>
</rewrite>
Above condition (in bold) will ignore CMS admin module URL from removing trailing-slash rule.
Please sign in to leave a comment.