I have many global IIS7 URL Rewrite rules and they by default apply to all sites. Well there are several sites that i would like to disable this rewrite inheritance on for all rules. How can I do this? I tried the following without joy:
<rewrite>
<rules>
<clear />
</rules>
</rewrite>
Sorry, that cannot be done:
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).
and
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With