You may wish to keep all of your rewrite rules in a file separate from web.config. This is quite easy to do.

To include rules you may have outside of web.config, you would include them by referencing the filename in the <rules> node’s configSource attribute as shown below:

<system.webServer>
	<rewrite>
		<rules configSource="rewriterules.config" />
	</rewrite>
</system.webServer>

The rewriterules.config file will then contain your rules. It does not require the XML schema declaration and starts directly at the <rules> node:

<rules>
	<rule name="name of rule">
	...
	</rule>
	<rule name="name of rule 2">
	...
	</rule>
</rules>