本地運行以下IIS URL重寫設置並不能得到它(從web.config中)工作:無法獲取靜態重定向到與IIS URL重寫工作2.0
<rewrite>
<rewriteMaps>
<rewriteMap name="StaticRedirects">
<add key="^tvb/" value="/tv/" />
</rewriteMap>
</rewriteMaps>
<rules>
<rule name="StaticRedirectsRule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{StaticRedirects: {REQUEST_URI}}" matchType="Pattern" pattern="(.+)" ignoreCase="true" negate="false" />
</conditions>
<action type="Redirect" url="{C:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
試圖打開url http://localhost/tvb/或http://localhost/tvb/?a=b會返回404錯誤,而不是將我重定向到http://localhost/tv(帶或不帶查詢字符串)。
我在這裏找到類似的帖子在stackoverflow上,我已經嘗試了他們推薦的內容:回收應用程序池,重新啓動IIS服務,用URL和/或REQUEST_FILENAME替換REQUEST_URI,但這些更改都沒有改變。
任何人都可以看到我錯了哪裏?