2017-08-09 62 views
0

这可能被问了很多次,但我有一个购买域名(通过1 & 1如果有的话)foobar.com。我已经在Azure和域中设置了自定义域来转发给我建立的天蓝应用程序服务,并且当有人访问foobar.com时,这种工作正常。我所看到的是如果有人去www.foobar.com。他们得到一个没有找到的丑陋的网络应用程序(一个Azure屏幕)。我需要设置什么才能使此重定向工作。我需要在某些方面更新域名/天蓝色吗?我在我的Web.config中有以下规则301在Azure中重定向

<rules> 
    <rule name="Redirect old-domain to new-domain" stopProcessing="true"> 
     <match url=".*" /> 
     <conditions> 
     <add input="{HTTP_HOST}" pattern="^www.foobar.com$" /> 
     </conditions> 
     <action type="Redirect" url="http://foobar.com/{R:0}" redirectType="Permanent" /> 
    </rule> 
    </rules> 

回答