0
votes

I am using "Application Request Routing" (ARR) and URL Rewrite 2.0 to implement a reverse proxy in IIS. The server is set up like this:

  • Server - no URL Rewrite rules specified, ARR Proxy enabled
    • App 1 - bound to 8080 and hostname app.site.com, no URL Rewrite rules specified
    • Redirect - bound to *:80 and *:443, with URL Rewrite configured for (.*) to http://localhost:8080/{R:1}

This all works fine, until I deploy a new version of "App 1" using Web Deploy. At that point an unexpected URL Rewrite rule appears in the configuration for "App 1" with the value /(.*), which obviously breaks everything. I also noticed that this rule is re-inserted whenever I click "Revert to Parent" in the configuration, but the parent (which I assume is the Server node) doesn't have any rules configured.

Why does this rule appear?

1

1 Answers

0
votes

If this ever happens to you, it's because the IIS interface is lying about what URL Rewrite rules are configured for your Server node. To be absolutely sure what rewrite rules are in your applicationHost.config:

  1. Open the configuration node for your Server in IIS
  2. Open Management -> Configuration Editor
  3. Go to the "system.webServer/rewrite/rules" Section.
  4. Make sure it says "Count=0". If there are entries, delete them and it will stop adding this rule with each deployment.