我在Facebook分享工具中看到循环重定向我无法解释用Wordpress写的帖子:
这不是Facebook debugger reports "Circular redirect path detected" (301) on certain website:我在页面中定义了og:url
元数据
WordPress帖子:http://tademo.trueanthem.com/evergreen/posting-just-fun/996/ - &gt;你可以看到有正确的og:url meta:<meta property="og:url" content="http://tademo.trueanthem.com/evergreen/posting-just-fun/996/" />
以及<link rel="canonical" href="http://tademo.trueanthem.com/evergreen/posting-just-fun/996/" />
Facebook共享调试工具:https://developers.facebook.com/tools/debug/sharing/?q=http%3A%2F%2Ftademo.trueanthem.com%2Fevergreen%2Fposting-just-fun%2F996%2F
/996/
These are the reported redirects
我运行curl来检查是否有重定向,并且没有重定向:
$ curl -IL 'http://tademo.trueanthem.com/evergreen/check-ga-ia/986/'
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 06 Nov 2017 18:15:49 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Keep-Alive: timeout=20
X-Pingback: http://tademo.trueanthem.com/xmlrpc.php
Link: <http://tademo.trueanthem.com/wp-json/>; rel="https://api.w.org/"
Link: <http://tademo.trueanthem.com/?p=986>; rel=shortlink
X-Cacheable: SHORT
Vary: Accept-Encoding,Cookie
Cache-Control: max-age=600, must-revalidate
X-Cache: MISS
X-Pass-Why:
X-Cache-Group: normal
X-Type: default
$
这里发生了什么?
答案 0 :(得分:0)
好吧,看起来Facebook抓取工具不喜欢永久链接末尾的3位数字。我删除了所有帖子的固定链接中的3位数字,现在Facebook共享工具没有问题。