我不認爲這是你的代碼的問題...我認爲這是你的虛擬主機的問題。
當我點擊在谷歌搜索鏈接上,我得到以下標題:
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-到它 –