Home  >  Article  >  Backend Development  >  php 智能404跳转代码

php 智能404跳转代码

PHP中文网
PHP中文网Original
2017-04-18 17:45:592209browse

适合于换域名,但是目录没有改变的网站.也可以用做301定向.收集过来.怕以后需要.需要的兄弟直接copy过去即可.

代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>404</title> 
<meta http-equiv=&#39;refresh&#39; content=&#39;5; url=http://www.jb51.net<?=$_SERVER[REQUEST_URI]?>&#39;> 
</head> 
<body> 
本站起用新域名访问 
你目前访问的页面是http://www.jb51.cn<?=$_SERVER[&#39;REQUEST_URI&#39;]?> 
系统为你重新定向到新站相应的页面http://www.php.cn<?=$_SERVER[&#39;REQUEST_URI&#39;]?> 
或等待5秒后,系统自动跳转到新站相应的页面 
</body> 
</html>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn