我在ASP.NET MVC 4应用程序中遵循了重写规则:
<rule name="Old Product Detail Page" stopProcessing="true">
<match url="pd\.asp\?productid=([0-9]+)$"/>
<action type="Redirect" redirectType="Permanent" url="/Product/Old/{R:1}"/>
</rule>
当我尝试在浏览器中访问/pd.asp?productid=12345
时,会显示"Server Error in '/' Application. The resource cannot be found. Requested URL: /pd.asp"
但是我在http://regex101.com测试了上面的模式,并说它找到了一个匹配。见http://regex101.com/r/hU9cR9/2
请帮忙!