简体   繁体   English

Laravel-Azure DNS-网站网址问题(url.com有效,www.url.com无效)

[英]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.

相关问题 结合来自url.com和www.url.com的喜欢 - Combining likes from url.com and www.url.com 使用htaccess将www.url.com/x=y重定向到www.url.com/file.php?x=y? - Redirect www.url.com/x=y to www.url.com/file.php?x=y with htaccess? 使用CURL进行下载而无需直接路径| www.url.com/things?download=文件 - Using CURL to download without a direct path | www.url.com/things?download=file 如何在Javascript代码示例中使用变量:src =“ htp://www.url.com/file.php?id = [3434]” - How To Use Variable In Javascript Code Ex: src=“htp://www.url.com/file.php?id=[3434]” url.com?somephpcode是否容易受到我代码中的任何攻击? - Is url.com?somephpcode vulnerable to anything from my code? 直接用户访问url.com/page的URL从URL选择div# - Direct user to url.com/page have url select div # from URL 转到具有我选择的下拉值的URL(url.com/dropdownvalue1+dropdownvalue2+etc) - Go to URL with dropdown values I select (url.com/dropdownvalue1+dropdownvalue2+etc) Htaccess URL将www.website.com/info/index.php重写为info.website.com - Htaccess URL rewrite www.website.com/info/index.php to info.website.com .htaccess将url.com/file.php?=$terms重定向到newurl.com/search.php?= $ terms(如果引荐来源网址不是site.com) - .htaccess redirect url.com/file.php?=$terms to newurl.com/search.php?=$terms if referrer is not site.com 使用REGEX将www * .com更改为可点击的URL - changing www*.com to a clickable URL with REGEX
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM