高性能双线全能型主机
10G光纤直入ChinaNET核心
功能强大的全实时控制中心
域名自由绑定
自由更改空间域名绑定
自由设置默认首页
在线压缩解压
行业内首家提供7秒钟响应服务
多服务器主机客户群服务
软硬件/透明防火墙三重保障
特有抗病毒内核
7X24小时全天后客户服务
    404错误页面的设置方法
 

如果是虚拟主机中要设置404错误页面
请用动态页面asp或PHP,这样才能正确放回404错误信息,设置为html或htm返回的是200信息
在asp代码上加入:
<%Response.Status = "404 Not Found"%>


在PHP代码上加入:
<?php
header('HTTP/1.1 404 Not Found');
?>

就可以了

如:
  1. <?php
  2. header('HTTP/1.1 404 Not Found');
  3. ?><html>
  4. <head>
  5. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  6. <meta http-equiv="refresh" content="2;URL=http://www.sv11.cn/">
  7. <title>404 Not Found</title>
  8. <style type="text/css">
  9. <!--
  10. .t {
  11. font-family: Verdana, Arial, Helvetica, sans-serif;
  12. color: #CC0000;
  13. }
  14. .c {
  15. font-family: Verdana, Arial, Helvetica, sans-serif;
  16. font-size: 11px;
  17. font-weight: normal;
  18. color: #000000;
  19. line-height: 18px;
  20. text-align: center;
  21. border: 1px solid #CCCCCC;
  22. background-color: #FFFFEC;
  23. }
  24. body {
  25. background-color: #FFFFFF;
  26. margin-top: 100px;
  27. }
  28. -->
  29. </style>
  30. </head>
  31. <body>
  32. <div align="center">
  33. <h2><span class="t">404 Not Found</span></h2>
  34. <h2><span class="t">你查找的页面不存在或转移请浏览本站首页</h2>
  35. <table border="0" cellpadding="8" cellspacing="0" width="460">
  36. <tbody>
  37. <tr>
  38. <td class="c">The requested URL was not found on this server.</td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. </body>
  44. </html>
复制代码