分享盒子

关注互联网和软件分享的IT科技平台

« EssentialPIM 3.7(简体中文)在zblog博客中插入千脑网盘 »

404延时跳转到主页,避免网站被K


        404页面其实对于搜索引擎是不友好的,尽量避免发生这样情形,但是在更换域名或者网站地址时,又不得不使用这种方法补救。既然404错误不可避免,那么我们可以使用这样的方法:加上 response.setStatus(200);

         这样对于搜索引擎来说就比较友好,不会因为404错误而影响你的SEO效果,非常管用。

<%
response.setStatus(200);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Refresh" content="1;url=http://www.sqlead.com">
<title>Mio-Tour Web Site</title>
</head>
<body>
<div class="errorbg">
<div id="error404_top"></div>
<div class="error404text">
<h1>Error <em>!</em></h1>
<p>the page you requested was not found.</p>
<p>Return to our homepage.</p>
</div>
<img src="../images/error404_bottom.gif" width="517" height="5" /></div>
</body>
</html>


原创文章请注明转载自 分享盒子,本文地址:http://www.sqlead.com/post/404page.html

  • 相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

网站分类

最近发表

最新评论及回复

Auto Publisher Copyright 2008-2010. Some Rights Reserved.|