Reputation: 487
We have a website www.A.Com and when I browse the URL www.A.Com/loc
I need to get redirected to sub-domain www.loc.A.Com which is hosted by SEO provider and show the page hosted by them.
The main requirement is we should not change the URL i.e. URL should remain www.A.Com/loc
We tried with URL Write module by defining the below Rule
<rewrite>
<rules>
<rule name="ProxyExample" stopProcessing="true">
<match url="^locations/?(.*)" />
<action type="Rewrite" url="http://A.Locations.com/{R:1}" />
<serverVariables>
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
</rules>
</rewrite>
One Note is Our Website is hosted on Azure App Service
Upvotes: 1
Views: 1508
Reputation: 8736
Your rule should work if you will remove serverVariables
:
<rule name="ProxyExample" stopProcessing="true">
<match url="^locations/?(.*)" />
<action type="Rewrite" url="http://A.Locations.com/{R:1}" />
</rule>
Upvotes: 1