We are trying move our web services from Azure Cloud Services to Azure Web Apps and that would change their address but we have some clients that we are not able to update the address they are using, so we are looking for a way to use the current cloud services server as a message forwarding server for those clients.
I am not an IIS admin so I tried to do some search and find out how to do it with ARR and URL Rewrite but it doesn't seem to work, so I am thinking even if this is the right approach to begin with!
I have enabled Proxy in ARR and created a rewrite rule in IIS for my app. Here is the result rewrite rule in web.config of the old address:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<outboundRules>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://new-address.azurewebsites.net/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Is this the proper way to achieve this? Or do I need to look into solving the issue another way?
Thanks in advance.