Last active
August 31, 2017 12:43
-
-
Save jsheely/5949562 to your computer and use it in GitHub Desktop.
IIS Url ReWrite rule to remove .aspx extension
This file contains hidden or 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="san aspx"> | |
<!--Removes the .aspx extension for all pages.--> | |
<match url="(.*)" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="{R:1}.aspx" /> | |
</rule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This actually seem to add aspx instead of removing it.
How about this one?