, .
, - MVC, , - asp.net.
, . www.example.com/test www.example.com/test/ .
, , , URL- , .
www.example.com/test/, www.example.com/test. ! . IIS www.example.com/test/, . Boo.
https://support.microsoft.com/en-us/kb/298408, IIS 6, , , .
, - asp.net, /test , IIS -, - . , , .
However! My requirement was for MVC and configured routes that are not directories. So I tried this again on the MVC website and the redirect to remove the trailing slash worked fine.
The rule in which I ended up:
<rule name="RemoveDatSlash" stopProcessing="true">
<match url="(.*)/$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="{R:1}" />
</rule>
Hope this helps!
source
share