Reverse proxy from IIS 8.5 to azure website
I have a glazed VM with IIS, I already have a website in this VM say mysite.com . Don't want my blog to be cataloged on the website, the blog is a WordPress site hosted separately on another azure website like http://siteblog.azurewebsites.net
I made a reverse proxy with 2 rules in IIS, the problem is with an outbound rule, I get the following error:
Outbound rewrite rules cannot be applied when the content is HTTP ("gzip").
Searching in google I found this article and two questions 1 , 2 practically all of them practically apply the same approach.
As per this article, I have to add a key to the windows registry, which is not possible to my knowledge.
On the machine running the website, from the command line: reg add HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ InetStp \ Rewrite / v LogRewrittenUrlEnabled / t REG_DWORD / d 0 You may have to follow this with iisreset
my rules in IIS web.config:
<rewrite>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1" stopProcessing="false">
<match filterByTags="A, Area, Base, Form, Img, Link" pattern="^http(s)?://mseblog.azurewebsites.net/(.*)" />
<action type="Rewrite" value="http{R:1}://mysite.com/{R:2}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{CACHE_URL}" pattern="^(https?)://" />
</conditions>
<action type="Rewrite" url="{C:1}://siteblog.azurewebsites.net/{R:1}" logRewrittenUrl="false" />
</rule>
</rules>
</rewrite>
Questions:
- How can I fix the error?
- Any other approach besides using url rewriting or reverse proxy?
source to share
No one has answered this question yet
See similar questions:
or similar: