Iis – Can’t find IIS Rewrite Rule in Config XML

iisiis-7rewrite

I created a new URL rewrite rule through the IIS manager GUI. But when I browse to the site config XML file, I don't see any rewrite rules even though I have confirmed the rewrite is working. I had expected that the rewrite GUI would generate the corresponding XML in the config file. Is that not how it works?

Best Answer

When adding a rewrite rules to a site it should save it in the site's web.config.

One reason I can think of why you don't see it there, is that you added the rule on the server level rather than the site level.

When done on the server level it is saved in the ApplicationHost.config file.

 %systemroot%\System32\inetsrv\config\applicationHost.config

You can also define it on the folder level, it that case it is saved in a web.config file inside that folder.