1

If we own www.ourdomain.com and wanted to rewrite the url to say www.google.com, how would we deal with gzip compression on say the google domain. I'm trying to do a proof of concept and i believe the issue is the website we are trying to rewite to uses gzip so IIS cant read the content? I have disabled all compression on our side. DO we need some sort of precondition?

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

 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" /> <rewrite> <outboundRules> <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form, Img" pattern="https://google.com/(.*)" /> <action type="Rewrite" value="http{R:1}://ourdomain.com/{R:2}" /> </rule> </outboundRules> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="true"> <match url="(.*)" /> <action type="Rewrite" url="http://google.com/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> 
1
  • You have compression enabled elsewhere in IIS Commented May 2, 2014 at 17:00

1 Answer 1

2

Found the answer after a lot of playing about

 <serverVariables> <set name="HTTP_Accept-Encoding" value="" /> </serverVariables> 
1
  • Basically you turned off compression on your backends... Outbound HTML content link rewrites are a sign of a broken design. It is usually an indicator of some workarounds. Commented Dec 4, 2022 at 10:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.