16

I've been trying to create outbound rules in IIS 7.5 on Windows 2008 R2 on a site that has static HTML pages and compression enabled.

If I have any form of compression enabled (static or dynamic) I get this error:

HTTP Error 500.52 - URL Rewrite Module Error. Outbound rewrite rules cannot
be applied when the content of the HTTP response is encoded ("gzip").

Turning off compression is not really an option due the large negative impact that would have on page load performance.

I imagine anyone who uses outbound rewrite rules is going to run into this error, as you would always want compression enabled for textual content.

I've looked at some suggestions to get this to work:

https://stackoverflow.com/questions/3713804/url-rewrite-outbound-rules-iis7/4363301#4363301

and

http://forums.iis.net/p/1165899/1937454.aspx#1937454

But I still get the same error.

Has anyone got this to work? If so how?

mpipe3
  • 271
  • 1
  • 2
  • 4
  • I have another problem...http://stackoverflow.com/questions/30806106/simple-iis-rewrite-outbound-rule-is-giving-an-error-and-page-crashes – DmitryBoyko Jun 12 '15 at 15:22
  • 1
    Why are you using outbound rewrite rules? Can you provide a sample of one of these rules for context? Perhaps a normal rewrite rule will suffice? – Anthony Kolka Feb 06 '18 at 21:35

1 Answers1

2

Please refer :https://blogs.msdn.microsoft.com/friis/2016/08/25/iis-with-url-rewrite-as-a-reverse-proxy-part-2-dealing-with-500-52-status-codes/

Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").

This is because the responses that are coming from the back end server are using HTTP Compression, and URL rewrite cannot modify a response that is already compressed. This causes a processing error for the outbound rule resulting in the 500.52 status code.

AKS
  • 121
  • 3