<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="ReverseProxyInboundRule" stopProcessing="true"> | |
<match url="(.*)" /> | |
<action type="Rewrite" url="https://cm.green/{R:1}" /> | |
</rule> | |
</rules> | |
<outboundRules> | |
<rule name="ReverseProxyOutboundRule1" preCondition="IsRedirection"> | |
<match serverVariable="RESPONSE_Location" pattern="^http(s)?://cm.green/(.*)" /> | |
<action type="Rewrite" value="http{R:1}://public.cm.com/{R:2}" /> | |
</rule> | |
<rule name="ReverseProxyOutboundRule2" preCondition="IsRedirection"> | |
<match serverVariable="RESPONSE_Location" pattern="^http(s)?://cm.blue/(.*)" /> | |
<action type="Rewrite" value="http{R:1}://public.cm.com/{R:2}" /> | |
</rule> | |
<preConditions> | |
<preCondition name="IsRedirection"> | |
<add input="{RESPONSE_STATUS}" pattern="3\d\d" /> | |
</preCondition> | |
</preConditions> | |
</outboundRules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment