I have set the following configuration set for a reverse proxy using ARR + URL Rewrite IIS7.5
I am trying to proxy www.originurl.com/e/ through front end site www.proxyurl.com/.
Note I'm mapping the proxy url to the origin url with a virtual directory. I get a 500 error. Any ideas as to what I'm doing wrong here?
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{CACHE_URL}" pattern="^(https?)://" />
</conditions>
<action type="Rewrite" url="{C:1}://www.originurl.com/e/{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^http(s)?://www.originurl.com/e/(.*)" />
<action type="Rewrite" value="http{R:1}://www.proxyurl.com/{R:2}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>