In IIS what is the difference between rewrite rules managed by URL Rewrite Module versus those which are only in the web.config file and do not appear in the URL Rewrite Module?
Using the URL Rewrite Module in IIS 7.5 to add a rule...
I notice that the rules, when looking at the web.config, are quite readable, and they are rooted in .
In contrast, using rewrite rules via web.config not managed by the URL Rewrite module...
do not seem to be as readable (perhaps this is not true for all), and these rules are rooted in instead of .
QUESTION: What is the difference, and what are pros/cons of using each? Personally, I like the ability to use the IIS module because it gives you an interface to test rules.
Example of a rule from the IIS 7.5 Rewrite Module:
<rewrite>
<rules>
<rule name="LowerCaseRule1" stopProcessing="true">
<match url="[A-Z]" ignoreCase="false" />
<action type="Redirect" url="{ToLower:{URL}}" />
</rule>
</rules>
</rewrite>
Example of a rule not managed by the IIS 7.5 Rewrite Module:
<rewriter>
<rewrite url="^/([0-9]+)/([0-9]+)/.*.aspx$"
to="~/ContentDisplay.aspx?CID=$1&SID=$2" processing="stop" />
</rewriter>
note: I added a linebreak to the second example of code after ".aspx$"