我不认为这是你的代码的问题...我认为这是你的虚拟主机的问题。
当我点击在谷歌搜索链接上,我得到以下标题:
Request URL:http://www.buckynet.org/
Request Method:GET
Status Code:200 OK
**Request Headers:**
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:PHPSESSID=lebmk3p73rpnralugsecmnvhk3; __qca=P0-875483401-1381177673275
Host:www.buckynet.org
Referer:https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=0CEUQFjAD&url=http%3A%2F%2Fwww.buckynet.org%2F&ei=MxlTUpjdDeboiALH8IDYAQ&usg=AFQjCNFQkHsKVWhjSyMkEQe67t0jpl6pCQ&sig2=kvqItrvhgwvdx0bZf2lZLQ&bvm=bv.53537100,d.cGE
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
**Response Headers**
Connection:Keep-Alive
Content-Length:0
Content-Type:text/html
Date:Mon, 07 Oct 2013 20:34:09 GMT
Keep-Alive:timeout=5, max=100
Server:Apache
在哪里,当我直接去www.buckynet.org,我得到这些标题:
Request URL:http://www.buckynet.org/
Request Method:GET
Status Code:301 Moved Permanently
**Request Headers**
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Cookie:PHPSESSID=lebmk3p73rpnralugsecmnvhk3; __qca=P0-875483401-1381177673275
Host:www.buckynet.org
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
**Response Headers**
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Length:0
Content-Type:text/html; charset=UTF-8
Date:Mon, 07 Oct 2013 20:38:25 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=100
Location:http://buckynet.org/
Pragma:no-cache
Server:Apache
X-Pingback:http://buckynet.org/wordpress/xmlrpc.php
在第一种情况下请注意状态码200 OK,在第二种情况下请注意301永久移动。
但是,Diodeus是正确的... ..没有你的index.php代码和可能的.htaccess你在该网站上,我们无法确定。
请阅读:http://meta.stackexchange.com/questions/125997/something-in-my-web-site-or-project-doesnt-work-can-i-just-paste-a-link-到它 –