【发布时间】:2014-03-10 16:09:18
【问题描述】:
我使用facebook debugger 来检查我的页面,它显示了Response Code 404,但对我来说它有效。
卷曲作品
我使用浏览器和 curl(来自其他服务器)进行了测试。 GET 和 POST 返回HTTP/1.1 200 OK:
curl -i http://www.mypage.de/stuff/test.html
curl -i -X POST http://www.mypage.de/stuff/test.html
页面有效
我使用http://validator.w3.org/ 检查我的test.html 并得到This document was successfully checked as XHTML + RDFa!
响应标头
Accept-Ranges:bytes
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:497
Content-Type:text/html
Date:Mon, 10 Mar 2014 16:13:15 GMT
ETag:"28a0b29-353-4f4429866eebc"
Keep-Alive:timeout=5, max=99
Last-Modified:Mon, 10 Mar 2014 15:52:48 GMT
Server:Apache/2.2.22 (Debian)
Vary:Accept-Encoding
为什么 facebook 会收到 404?
更新
如果我查看访问日志,所有请求都到达服务器,但 404 访问来自默认而不是正确的虚拟主机。
如果我在 facebook 中使用 IP 而不是 dns,它可以正常工作。
【问题讨论】:
标签: php facebook debugging curl http-status-code-404