Architecture: User --> ARR Server --> LB --> 2 Web Server serving 2 different sites Web Server1 serving -> https://xxxx-green-xxxx-xxxx.net/xxx/xxx?xx=xxxx where green keyword comes in any place in domain name Web Server2 serving -> https://xxxx-yellow-xxxx-xxxx.net/xxx/xxx?xx=xxxx where yellow keyword comes in any place in domain name
Requirement: Request format: https://xxxx-green-xxxx-xxxx.net/xxx/xxx?xx=xxxx or yellow URL In ARR we need to filter the URL with green and yellow keyword in URL and send it to respective Web Server IP.
But all my requests are landing to home page only. and even i am confused that whether changing the host will work but i need to give IP which is different for each web server in LB
We have set this Rule and getting below results:
<rule name="Green" enabled="true" stopProcessing="true">
<match url="(.*xxx.net)(/.*)" />
<conditions logicalGrouping="MatchAll"
trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="green" />
</conditions>
<action type="Rewrite" url="https://xx.xxx.xx.xx/{R:2}"
appendQueryString="true" />
</rule>
Where R:2 is --> xxx/xxx?xx=xxxx