我整天都在尝试为 IIS 中的 URL 重写制定规则,但我的规则都不起作用..
我想重写 url 来转换这些类型的 Url
http://localhost:2811/Search/S%2fqIMmjstZg%3d/VehicleDetails.aspx
到http://localhost:2811/Search/VehicleDetails.aspx?mid=S%2fqIMmjstZg%3d
http://localhost:2811/Search/yYut%2f%2fBrHa8%3d/VehicleDetails.aspx
到
http://localhost:2811/Search/VehicleDetails.aspx?mid=yYut%2f%2fBrHa8%3d
http://localhost:2811/Search/nNLApdJeWJI%3d/VehicleDetails.aspx
到
http://localhost:2811/Search/VehicleDetails.aspx?mid=nNLApdJeWJI%3d
具有以下重写规则
<rewrite>
<rules>
<rule name="QueryString">
<match url="^Search/([_0-9a-z-%=\+\$]*)$/VehicleDetails.aspx" />
<action type="Rewrite" url="Search/VehicleDetails.aspx?mid={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
但它不起作用..请帮助!!!