Created
October 8, 2018 00:02
-
-
Save Swimburger/5f2a65cc74cd802f31f56039f87d9d3a to your computer and use it in GitHub Desktop.
Add trailing slash to URL redirects IIS web.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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" /> | |
</conditions> | |
<action type="Redirect" redirectType="Permanent" url="{R:1}/" /> | |
</rule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What if you want to FORCE redirect to HTTPS?