【发布时间】:2017-12-24 22:00:37
【问题描述】:
【问题讨论】:
-
请不要发布代码图片,它不可搜索,我们无法将其复制到答案中。
标签: asp.net url-rewriting url-routing
【问题讨论】:
标签: asp.net url-rewriting url-routing
听起来您想将/index.html 重写为index.aspx。您只需将此重写规则添加到您的 web.config:
<rule name="Rewrite index.html" stopProcessing="true">
<match url="^index.html" />
<action type="Rewrite" url="/index.aspx"/>
</rule>
那么如果你访问http://yourwebserver/index.html,web服务器就会执行/index.aspx
【讨论】: