我似乎无法弄清楚为什么以下内容会将所有流量发送到未找到页面的页面,即使是由 Paypal 推荐的。有任何想法吗?
$refererUrl = $_SERVER['HTTP_REFERER'];
$Exploded = explode("/",$refererUrl);
$urlToCheck = $Exploded[3];
$findURL = strpos($urlToCheck,'paypal.com');
if($findURL === false){
header('location:/page-not-found');
} else {
/* Do something if page referred to by Paypal */
}