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

php 智能404跳转代码

PHP中文网
Release: 2023-02-28 10:14:02
Original
2300 people have browsed it

适合于换域名,但是目录没有改变的网站.也可以用做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>
Copy after login


Related labels:
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template