IIS URL Rewrite: Add trailing slash except for .html and .aspx
问题 Adding a trailing slash to all URLs through IIS URL Rewrite Module is widely spread, but how do I add exceptions for URLs that ends with .html and .aspx ? Today I have this: <rule name="Add trailing slash" stopProcessing="true"> <match url="(.*[^/])$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <!-- Doesn't seem to be working --> <!--<add input="{REQUEST_URI}" pattern="(.*?).html$"