Skip to content

Instantly share code, notes, and snippets.

@netnr netnr/web.config

Created May 17, 2020
What would you like to do?
IIS 重写 URL,移除 .html 后缀,依赖 URL Rewrite
<!-- web.config -->
<rule name="RewriteHTML">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<action type="Rewrite" url="{R:1}.html" />
<!--URL Rewrite 下载地址: -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.