自定义域上的页面出现“太多重定向”错误
我有一个来自Namecheap.com的域,并通过github页面托管了一个页面。有时我的页面无法加载,并提供“太多重定向”错误。我认为问题出在我的高级DNS的某处。看看它 - enter image description here自定义域上的页面出现“太多重定向”错误
基本上我有2条记录指向Github的IP地址和CNAME记录指向mygithubusername.github.io和指向我的域的URL重定向记录。我究竟做错了什么?
回答:
据我所见,问题来自URL重定向记录。当试图到达www.akshayud.me
时,它重定向到akshayud.me
,并且当它到达URL重定向时,它重定向回www.akshayud.me
,重定向到akshayud.me
,并且正在进行无限循环。
解决它可以从DNS(这是我的首选解决方案)中删除URL记录,或修复从www到web服务器级根目录的重定向。 这里是我的wget输出(我只使用URL记录IP来保证URL重定向记录的100%使用):
$ wget www.akshayud.me --2017-12-19 08:03:18-- http://www.akshayud.me/
Resolving www.akshayud.me (www.akshayud.me)... 151.101.1.147, 151.101.65.147, 151.101.129.147, ...
Connecting to www.akshayud.me (www.akshayud.me)|151.101.1.147|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://akshayud.me/ [following]
--2017-12-19 08:03:18-- http://akshayud.me/
Resolving akshayud.me (akshayud.me)... 162.255.119.148
Connecting to akshayud.me (akshayud.me)|162.255.119.148|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.akshayud.me/ [following]
--2017-12-19 08:03:18-- http://www.akshayud.me/
Connecting to www.akshayud.me (www.akshayud.me)|151.101.1.147|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://akshayud.me/ [following]
--2017-12-19 08:03:18-- http://akshayud.me/
Connecting to akshayud.me (akshayud.me)|162.255.119.148|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.akshayud.me/ [following]
--2017-12-19 08:03:19-- http://www.akshayud.me/
Connecting to www.akshayud.me (www.akshayud.me)|151.101.1.147|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://akshayud.me/ [following]
以上是 自定义域上的页面出现“太多重定向”错误 的全部内容, 来源链接: utcz.com/qa/264085.html