views:

708

answers:

1

Is it possible to move the rules created by the IIS7 rewrite module from the root web config into its own web config file like you can with appsettings and if so how?

+2  A: 

I can't seem to get it working, but the way it's described is:

<rewrite>
   <rewriteMaps configSource="external.config">
   </rewriteMaps>
</rewrite>

Then in the external.config file add your rules:

<rewriteMaps>
  <rewriteMap ...
  ...
</rewriteMaps>

You have to do this with the entire rewriteMap**s** section: according to this forum post, you can't do this with the rewriteMap: http://forums.iis.net/t/1154113.aspx

willoller
Thanks, this works for me.
Meixger