Php uses the header function to implement 301 jump code instances. The code for copying small code jumps to PHP301 is as follows :? Php $ the_host $ _ SERVER [HTTP_HOST]; $ request_uriisset ($ _ SERVER [REQUEST_URI])? $ _ SERVER [REQUEST_URI]:; if ($ the_h PHP 301 redirection small code
The code is as follows:
$ The_host = $ _ SERVER ['http _ host'];
$ Request_uri = isset ($ _ SERVER ['request _ URI '])? $ _ SERVER ['request _ URI ']: '';
If ($ the_host! = 'Www .jb51.net ')
{
// Echo $ _ SERVER ['http _ host']. $ _ SERVER ['php _ SELF '];
Header ('http/1.1 301 Moved Permanently ');
Header ('Location: http://www.jb51.net '. $ _ SERVER ['php _ SELF']. $ request_uri );
}
?>
The code for the small jump to http://www.bkjia.com/PHPjc/825209.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/825209.htmlTechArticlePHP 301 is as follows :? Php $ the_host = $ _ SERVER ['http _ host']; $ request_uri = isset ($ _ SERVER ['request _ URI '])? $ _ SERVER ['request _ URI ']: ''; if ($ the_h...