We have a webserver with IIS reverse proxy and apps server with application, configured reverse proxy with http and the reverse proxy rules works fine.
The same application and reverse proxy after configuring with SSL certs, browser fails to load the application. Chrome browser throws "ERR_TOO_MANY_REDIRECTS"
Below is the working rewrite rule for HTTP.
<rewrite>
<rules>
<rule name="Reverse Proxy to EDS IDP Authenticate" enabled="true" stopProcessing="true">
<match url="^(.*)" /> <!-- rule back-reference is captured here -->
<conditions>
<add input="{REQUEST_URI}" matchType="Pattern" pattern="(.*?)authuser.aspx" />
</conditions>
<action type="Rewrite" url="http://10.6.48.133:80/{R:1}" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
<rule name="Reverse Proxy to EDS return" enabled="true" stopProcessing="true">
<match url="^(.*)" />
<conditions>
<add input="{REQUEST_URI}" matchType="Pattern" pattern="(.*?)/admin/settings/index.w3p" />
</conditions>
<action type="Rewrite" url="http://10.6.48.133:81/admin/settings/index.w3p" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
<rule name="Reverse Proxy to EDS View Settings" enabled="true" stopProcessing="true">
<match url="^(.*)" />
<conditions>
<add input="{REQUEST_URI}" matchType="Pattern" pattern="(.*?)index.w3p" />
</conditions>
<action type="Rewrite" url="http://10.6.48.133:81/index.w3p" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
<rule name="Reverse Proxy to EDS" enabled="true" stopProcessing="true">
<match url="^(.*)" />
<action type="Rewrite" url="http://10.6.48.133:81/{R:1}" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
</rules>
<outboundRules>
<rule name="EDS" preCondition="ResponseIsHtml1" enabled="true">
<match filterByTags="A, Form, Head, Img, Link, Script" pattern="^http(s)?://10.6.48.133:81/(.*)" />
<action type="Rewrite" value="http{R:1}://10.6.48.134:81/{R:2}" />
</rule>
<rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
<match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
<action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
<preCondition name="NeedsRestoringAcceptEncoding">
<add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
</preCondition>
<preCondition name="ResponseIsTextAnything">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/(.+)" />
</preCondition>
</preConditions>
<customTags>
<tags name="LEAP - Redirect">
<tag name="meta" attribute="content" />
</tags>
</customTags>
</outboundRules>
Above rules, except the server variables we have updated all rewrite urls from HTTP to HTTPS and reverse proxy failed with "Multiple redirects".
Thanks