[英]Laravel - Azure DNS - Website url issues (url.com works , www.url.com does not)
I'm trying to setup my azure web app and having some issues with DNS and url 我正在尝试设置我的Azure Web应用程序,并且DNS和URL出现了一些问题
This is my htaccess in the root folder : 这是我的htaccess在根文件夹中:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
This is my htaccess in the public folder : 这是我在公共文件夹中的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>
This is my godaddy records : 这是我的哥达唱片:
My websites works at url.com 我的网站在url.com上运行
but not for : 但不适用于:
www.url.com www.url.com
http://www.url.com http://www.url.com
I get this page : 我得到此页面:
Since www.url.com
points to site.azurewebistes.net
and not back at url.com
you need to add www.url.com
in the Custom domains blade for your Web App in the Azure Portal. 由于
www.url.com
指向site.azurewebistes.net
而不是返回url.com
,因此需要在Azure门户中为Web应用程序的“ 自定义域”刀片中添加www.url.com
。
You need to tell the Web App that it should answer for www.url.com
as well. 您需要告诉Web应用程序,它也应该回答
www.url.com
。
Or just CNAME www
to your root instead (i believe you still need to add the www
to the Custom Domains blade though). 或仅将CNAME
www
到您的根目录中(我相信您仍然需要将www
添加到“自定义域”边栏选项卡中)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.