2
我需要使用URL重寫,所以我做了一個試驗的情況下,在Web.config中,要檢查它的工作:URL重寫與Web.config文件不IIS工作表現
Web.config文件:
<system.webServer>
<rewrite>
<rules>
<rule name="Fail bad requests">
<match url=".*"/>
<action type="AbortRequest" />
</rule>
</rules>
</rewrite>
... other stuff
</system.webServer>
我期待任何localhost:3285
中止和失敗,但它輸入正確。
我使用的是帶有IIS Express的Url Rewrite。