如何创建重写规则是为了实现以下目的:
之前:content/release/0.9.html
之后:release-notes/0.9
现在我有:
<rule name="Rewrite rule1 for content">
<match url="^content/release/(.+)$" />
<action type="Rewrite" url="release-notes/{R:1}" />
</rule>
如何摆脱“after”输出中的“.html”?
答案 0 :(得分:3)
试试这个:
<rule name="Rewrite rule1 for content">
<match url="^content/release/(.+)\.html$" />
<action type="Rewrite" url="release-notes/{R:1}" />
</rule>