快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

智能跳转的404错误页面

  会根据访问者哀求的原来旧站中存在的页面,自动的跳转到新站中相应的页面如:
  访问者哀求http://asp2k.com/1.html
  则系统自动跳转到http://www.asp2k.com.cn/1.html

Shtml版代码:
<html>
<head>
<meta http-equiv=\\'refresh\\' content=\\'5; url=http://www.0716.org<!--#echo var="REQUEST_URI" -->\\'>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
BODY {
FONT-SIZE: 12px;
SCROLLBAR-ARROW-COLOR: #000000;
FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
SCROLLBAR-BASE-COLOR: #828fa2;
}
TD {
FONT-SIZE: 12px;
FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
}
A:active {
COLOR: #000000; TEXT-DECORATION: underline
}
A:visited {
COLOR: #455164; TEXT-DECORATION: underline
}
A:hover {
COLOR: #000000; TEXT-DECORATION: none
}
A:link {
COLOR: #455164; TEXT-DECORATION: underline
}
</STYLE>
<TITLE>本站已经启用新的国际域名WWW.0716.org,系统正在为你重新定向到新网站中的相应网页.......</TITLE>
</head>
<body leftmargin="10" topmargin="10" marginwidth="10" marginheight="10" style="table-layout:fixed; word-break:break-all">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="95%" align="center">
<tr align="center" valign="middle">
<td>
<table border="0" cellspacing="1" cellpadding="10" bgcolor="#555555" width="60%">
<tr>
<td bgcolor="#EEEEEE" align="center">
<p><b>本站启用新的国际域名<a href=http://www.0716.org>0716.org</a>,系统正在为你重新定向到新站中的相应网页....</b></p></td>
</tr>
<tr>
<td bgcolor="#EEEEEE" align="left">
<p>目前你需要访问旧站1675.com.ru中的页面:http://1675.com.ru<!--#echo var="REQUEST_URI" --><br><br>
系统在5秒后将为你重新定向到新站<b>0716.org</b>中相应的页面<br>
假如你不想等待,请直接点击下面的连接进入:<a href=http://www.0716.org<!--#echo var="REQUEST_URI" -->>http://www.0716.org<!--#echo var="REQUEST_URI" --></a><br>


</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
 

PHP版的代码:

<!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=\\'refresh\\' content=\\'5; url=http://www.0716.org<?=$_SERVER[REQUEST_URI]?>\\'>
</head>
<body>
本站起用新域名访问
你目前访问的页面是
http://1675.com.ru<?=$_SERVER[\\'REQUEST_URI\\']?>
系统为你重新定向到新站相应的页面
http://www.0716.org<?=$_SERVER[\\'REQUEST_URI\\']?>
或等待5秒后,系统自动跳转到新站相应的页面
</body>
</html>


返回类别: 教程
上一教程: 社区(php&&mysql)六
下一教程: 用PHP实现标准的IP Whois查询

您可以阅读与"智能跳转的404错误页面"相关的教程:
· 定制404错误页面,并发信给治理员的程序
· PHP:404错误陷阱并email给治理员的程序
· 计算页面执行时间
· PHP4中session的应用(2)--欢迎页面(welcome_reserve.php3)
· 简朴的页面缓冲技术(一)
    微笑服务 优质保证 索取样品