什么可能导致302重定向?

时间:2018-01-03 17:49:40

标签: facebook .htaccess redirect http-status-code-302

我有一个wordpress网站,我有一个博客。当我尝试在FB http://videoefekt.cz/?p=472上分享我的博文时,它会显示我主页的大拇指。我试图更改永久链接以清除,停用插件和chceck .htaccess文件,一切看起来都很好,但FB共享调试器显示我有302 HTTP重定向到我的主页,有谁能告诉我什么可能导致这个问题?

1 个答案:

答案 0 :(得分:0)

模拟Facebook抓取工具对您网站的访问权限,并在使用ipv6地址时重定向到主页。当请求来自ipv6地址时,您可能有错误配置。

curl -H "User-Agent: facebookexternalhit/1.1" "http://videoefekt.cz/?p=472" -vvvv -6
* About to connect() to videoefekt.cz port 80 (#0)
*   Trying 2a02:2b88:1:4::a6...
* Connected to videoefekt.cz (2a02:2b88:1:4::a6) port 80 (#0)
> GET /?p=472 HTTP/1.1
> Host: videoefekt.cz
> Accept: */*
> User-Agent: facebookexternalhit/1.1
> 
< HTTP/1.1 302 Found
< Date: Thu, 04 Jan 2018 04:16:32 GMT
< Server: Apache
< Pragma: no-cache
< Expires: Wed, 11 Jan 1984 05:00:00 GMT
< Cache-Control: no-cache, must-revalidate, max-age=0
< Link: <http://videoefekt.cz/wp-json/>; rel="https://api.w.org/"
< Set-Cookie: _icl_current_language=cs; expires=Fri, 05-Jan-2018 04:16:33 GMT; Max-Age=86400; path=/
< Set-Cookie: wfvt_3708104896=5a4daaa1e2090; expires=Thu, 04-Jan-2018 04:46:33 GMT; Max-Age=1800; path=/; HttpOnly
< Set-Cookie: PHPSESSID=8a1a1d9247ac9d9707b616c6c0ad2ccc; path=/
< Upgrade: h2,h2c
< Connection: Upgrade
< Location: http://videoefekt.cz/
< Vary: User-Agent
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< 
* Connection #0 to host videoefekt.cz left intact