我使用php腳本進行重定向後,搜索引擎搜索到我的websiter的搜索詞。php腳本重定向代碼問題
和我的重定向代碼工作正常
但對一些物關鍵詞我笏留在同一個頁面。對於這些代碼行,我在頁面中收到一條警告消息。
Warning: headers already sent
(output started at /home/friendsj/public_html/index.php:2) in
/home/friendsj/public_html/index.php on line 20
下面
爲i應用於的網頁
$ref=$_SERVER['HTTP_REFERER'];
if(strstr($ref,"test")){
$url="http://www.howtomark.com/robgoyette.html";
}
else if(strstr($ref,"mu+word+gmail")){
$url="http://www.howtomark.com/marketbetter.html";
}
else{
if(strstr($ref,"how+to+market+better")){
}
}
if($url !=""){
header("Location:$url");
}
您可以使用 '0101010' 按鈕格式化代碼。否則,它不可讀。 – 2010-04-29 09:53:08
同時在「?>」後檢查文件末尾是否有空格 – 2010-04-29 10:21:58