【发布时间】:2012-02-29 22:28:01
【问题描述】:
我目前在 IIS 上有一个重写规则:
<rewrite>
<rules>
<rule name="rewrite asp">
<!--Removes the .asp extension for all pages.-->
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" negate="true" pattern="(.*).asp" />
</conditions>
<action type="Rewrite" url="{R:1}.asp" />
</rule>
</rules>
</rewrite>
这可以实现:
site.com/allpages --> site.com/allpages.asp
现在,是否可以创建一个异常以便特定页面重写到另一个扩展?
site.com/exception --> site.com/exception.php
【问题讨论】:
标签: iis-7 url-rewriting