301 Page Turn php,301 page turn to _php tutorial

Source: Internet
Author: User

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.