假如是虛構(gòu)主機中要設(shè)置404錯誤的頁面 請用動態(tài)頁面asp或PHP,多么本事精確放回404粗偶的消息,設(shè)置為html或htm返回的是200消息 在asp代碼上加入: <%Response.Status = "404 Not Found"%>
在PHP代碼上加入: <?php header('HTTP/1.1 404 Not Found'); ?>
就能了
如: <?php
header('HTTP/1.1 404 Not Found');
?><html>
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="2;URL=http://www.sv11.cn/">
<title>404 Not Found</title>
<style type="text/css">
<!--
.t {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #CC0000;
}
.c {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
color: #000000;
line-height: 18px;
text-align: center;
border: 1px solid #CCCCCC;
background-color: #FFFFEC;
}
body {
background-color: #FFFFFF;
margin-top: 100px;
}
-->
</style>
</head>
<body>
<div align="center">
<h2><span class="t">404 Not Found</span></h2>
<h2><span class="t">你查找的頁面不具備或轉(zhuǎn)移請瀏覽本站首頁</h2>
<table border="0" cellpadding="8" cellspacing="0" width="460">
<tbody>
<tr>
<td class="c">The requested URL was not found on this server.</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
|