1, 將下面代碼存為missing.PHP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD Html 4.0 Transitional//EN">
<%@ Page Language="C#" EnableVIEwState="false" %><Html><HEAD><TITLE>頁面跳轉</TITLE>
<META http-equiv=Content-Type content="text/Html; charset=gb2312">
<SCRIPT type=text/Javascript>
<!--
var duration=2900;
var endTime = new Date().getTime() + duration + 100;
function interval()
{
var n=(endTime-new Date().getTime())/1000;
if(n<0) return;
document.getElementById("timeout").innerHtml = n.toFixed(3);
setTimeout(interval, 10);
}
window.onload=function()
{
setTimeout("window.location.href='http://www.jzxue.Net<?=$_SERVER['REQUEST_URI']?>'", duration);
interval();
}
//-->
</SCRIPT>
<META content="MSHtml 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<FORM id=form1 runat="server">
<DIV>系統在 <SPAN id=timeout>3.000</SPAN> 秒後 將自動跳轉到 <A
href="http://www.jzxue.Net<?=$_SERVER['REQUEST_URI']?>">您訪問的頁面</A> </DIV>
</FORM></BODY></Html>
2, 設置.htAccess文件
Options -Indexes
ErrorDocument 404 /missing.PHP
3, 以上僅適用Linux系統。
4, 轉載請注明出處。