2017-08-13 46 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添加到自定義域刀片中)。