title: HTTP Error 500.52 - URL Rewrite Module Error.
body: <p>I am trying to setup a reverse proxy with IIS 7.5. I want an incoming request that matches a certain URL pattern to be served by Tomcat. I have used the tutorial here to configure it.</p>
  
  <p><a href="http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing" rel="noreferrer">http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing</a></p>
  
  <p>My settings are as below: </p>
  
  <pre><code>&lt;rewrite&gt;
          &lt;rules&gt;                
              &lt;rule name="ReverseProxyInboundRule1" stopProcessing="true"&gt;
                  &lt;match url=".*/(Locations|FacetedSearch|LocationPage)/.*" /&gt;
                  &lt;action type="Rewrite" url="http://search.xxx.com/{R:1}" /&gt;
                   &lt;serverVariables&gt;
                      &lt;set name="HTTP_ACCEPT_ENCODING" value="" replace="true" /&gt; 
                  &lt;/serverVariables&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
          &lt;outboundRules&gt;
              &lt;rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1"&gt;
                  &lt;match filterByTags="A, Form, Img" pattern="^http(s)?://search.xxx.com/(.*)" /&gt;
                  &lt;action type="Rewrite" value="http{R:1}://dev.xxx.com/{R:2}" /&gt;
              &lt;/rule&gt;
              &lt;preConditions&gt;
                  &lt;preCondition name="ResponseIsHtml1"&gt;
                      &lt;add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /&gt;
                  &lt;/preCondition&gt;
              &lt;/preConditions&gt;
          &lt;/outboundRules&gt;
      &lt;/rewrite&gt;
      &lt;tracing&gt;
  </code></pre>
  
  <p>HTTP Error 500.52 - URL Rewrite Module Error.
  Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("deflate").</p>