HOME
DOMAIN
WEB HOST
AUTO Site
VPS SERVER
CLOUD HOST
SERVER
HK HOST
AGENT
SERVICE
$sn = strtolower($_server['server_name']?$_server['server_name']:$_server['http_host']); $query = trim(@$_server['request_uri']); $sn = str_replace('http://','',strtolower($sn)); $url ='www.phpfensi.com'; if( $sn !=$url || strpos($query,'index.php')) { header( "http/1.1 301 moved permanently" ); header( "location: http://$url" ); } //带参数,代码如下: $url = "http://".$url.$_server["request_uri"]; header("http/1.1 301 moved permanently"); header ("location:http://$url");