Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable IIS7 URL Rewrite inheritance on a per site basis?

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>
like image 915
Jim Bohm Avatar asked Oct 11 '22 08:10

Jim Bohm


1 Answers

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/

like image 171
LazyOne Avatar answered Oct 14 '22 04:10

LazyOne