301 Page Turn php,301 page turn
New 301.php page, index.php reference 301.php page in program entry file
The 301.php content is as follows and is for reference only:
$the _host = $_server[' http_host '];//get the current domain name
$the _url = isset ($_server[' Request_uri ')? $_server[' Request_uri ': ";//determine the address after the part
$the _url = strtolower ($the _url);//convert English letters to lowercase
if ($the _url== "/index.php")//judgment is not home
{
$the _url= "";//If it is the first page, the assignment is empty
}
if ($the _host!== ' www.baidu.com ')//If the domain name is not a URL with www then proceed to the following 301 jump
{
Header (' http/1.1 301 Moved permanently ');//301 head issued
Header (' location:http://www.baidu.com '. $the _url);//jump to the URL with www
}
?>
http://www.bkjia.com/PHPjc/1035424.html www.bkjia.com true http://www.bkjia.com/PHPjc/1035424.html techarticle 301 Page Turn php,301 page to the new 301.php page, in the program portal File index.php reference 301.php page 301.php content as follows, only for reference:? php $the _host = $_server[' HTTP ...