加个判断每次访问只跳转一次$current_url = http $_SERVERHTTP_HOST $_SERVERREQUEST_URI;$new_url = httpwwwhostgay $_SERVERREQUEST_URI;headerLocation $new_url;exit;
加判断的代码如下:
$current_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $new_url = "http://www.host.gay" . $_SERVER['REQUEST_URI'];
if ($current_url != $new_url) { header("Location: $new_url"); exit(); }
原文地址: http://www.cveoy.top/t/topic/cG7J 著作权归作者所有。请勿转载和采集!