0
我在的地方目前在IIS上這個重寫規則:IIS URL重寫例外
<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