我有许多全局 IIS7 URL 重写规则,默认情况下它们适用于所有站点。好吧,有几个站点我想禁用所有规则的重写继承。我怎样才能做到这一点?我没有高兴地尝试了以下操作:
<rewrite>
<rules>
<clear />
</rules>
</rewrite>
最佳答案
对不起,这是不可能的:
Global rewrite rules are used to define server-wide URL rewriting logic. These rules are defined within applicationHost.config file and they cannot be overridden or disabled on any lower configuration levels, such as site or virtual directory. Global rules always operate on the absolute URL path (that is, requested URI without the server name).
和
Global rule set is always evaluated first, and after that distributed rule set will be evaluated by using a URL string produced by global rule set.
http://learn.iis.net/page.aspx/468/using-global-and-distributed-rewrite-rules/
关于iis-7 - 在每个站点的基础上禁用 IIS7 URL 重写继承?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6945954/