0
我可以重定向,並作出單一友好的URL:具有相同的圖案友好的URL
<rule name="RedirectUserFriendlyURL1" stopProcessing="true">
<match url="^Product/Tour\.aspx$" />
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
</conditions>
<action type="Redirect" url="Product/Tour" appendQueryString="false" />
</rule>
<rule name="RewriteUserFriendlyURL2" stopProcessing="true">
<match url="^Product/Tour$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="Product/Tour.aspx" />
</rule>
但是,舉例來說,如果我有:
http://www.domain.com/Product/Features.aspx
http://www.domain.com/Product/Download.aspx
http://www.domain.com/Product/FAQ.aspx
等
我可以寫一條規則爲所有這些鏈接建立友好的URL以便接收?
http://www.domain.com/Product/Features
http://www.domain.com/Product/Download
http://www.domain.com/Product/FAQ
有一些鏈接很容易,但有很多規則很難維護。