2017-08-13 60 views
0

我想设置我的天蓝色的web应用程序,并具有与DNS和URLLaravel - Azure的DNS - 网站网址的问题(url.com工作,www.url.com不)

一些问题,这是我的htaccess的根文件夹:

<IfModule mod_rewrite.c> 
    RewriteEngine on 
    RewriteCond %{REQUEST_URI} !^public 
    RewriteRule ^(.*)$ public/$1 [L] 
</IfModule> 

这是我在公用文件夹中的htaccess:

<IfModule mod_rewrite.c> 
    <IfModule mod_negotiation.c> 
     Options -MultiViews 
    </IfModule> 

    RewriteEngine On 

    # Redirect Trailing Slashes If Not A Folder... 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)/$ /$1 [L,R=301] 

    # Handle Front Controller... 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule^index.php [L] 

    # Handle Authorization Header 
    RewriteCond %{HTTP:Authorization} . 
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 
</IfModule> 

这是我godaddy的记录:

enter image description here

我的网站的工作在url.com

但不适用于:

www.url.com

http://www.url.com

我得到这个页面:

enter image description here

回答

0

由于www.url.comsite.azurewebistes.net,而不是回到url.com您需要在自定义域刀片添加www.url.com您的Web应用程序在Azure的门户网站。

您需要告诉Web应用程序它也应该回答www.url.com

或者只是CNAME www而不是您的根(我相信您仍然需要将www添加到自定义域刀片中)。