【发布时间】:2017-11-07 01:57:17
【问题描述】:
我们有一个网站 www.A.Com,当我浏览 URL www.A.Com/loc
我需要重定向到由 SEO 提供商托管的子域 www.loc.A.Com 并显示由他们托管的页面。
主要要求是我们不应更改 URL,即 URL 应保持 www.A.Com/loc
我们通过定义以下规则尝试使用 URL 写入模块
<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>
请注意,我们的网站托管在 Azure 应用服务上
【问题讨论】:
标签: redirect iis url-rewriting web-config url-redirection