<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>页面不存在</title>
<script type="text/javascript">    
function countDown(secs,surl){    
 //alert(surl);    
 var jumpTo = document.getElementById('jumpTo');
 jumpTo.innerHTML=secs; 
 if(--secs>-1){    
     setTimeout("countDown("+secs+",'"+surl+"')",1000);    
     }    
 else{      
     location.href=surl;    
     }    
 }    
</script>
</head>

<body>该页面不存在，<span id="jumpTo">5</span>秒后自动跳转到首页
<script type="text/javascript">countDown(5,'/');</script> 
</body>
</html>

<!--
RewriteEngine On 
RewriteCond %{QUERY_STRING} (.*)~(.*)$
RewriteRule (.*)$ $1\?%1%2  [NC,R=301]
-->