【发布时间】:2011-08-07 02:52:15
【问题描述】:
我正在尝试映射这个旧的网络表单 URL
http://www.mysite.com/Listing.aspx?mlsnum=T5017910
到这个新的 MVC URL:
http://www.mysite.com/listing?id=T5017910
不知怎的,我无法让它工作。我的规则如下:
<rule name="My Listing Redirect Rule" stopProcessing="true">
<match url="^Listing.aspx?mlsnum=([0-9a-z]+)" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Redirect" url="listing?id={R:1}" redirectType="Permanent" />
</rule>
感谢任何帮助。
【问题讨论】:
标签: asp.net regex asp.net-mvc-3 url-rewriting iis-7.5