|
嗯,我看过了,
if ( strcmp( strtolower( $_SERVER['HTTP_HOST'] ) , "www.sitename.com" ) != 0 &&
strcmp( strtolower( $_SERVER['REQUEST_METHOD'] ) , "get" ) == 0 &&
$_SERVER['SERVER_PORT'] == 80 )
{
header("Location: http://www.sitename.com" . $_SERVER['REQUEST_URI'] );
exit ;
}
这个代码是不是301永久重定向代码!还是就是简单的转向 |
|