开发者社区 问答 正文

云虚拟主机linux主机404页面设置(页面状态码是404)

1、编辑404.php页面
<?php
@header("http/1.1 404 not found");
@header("status: 404 not found");
echo 'echo 404';
exit();
?>

2、编辑.htaccess文件( 常用ftp客户端连接设置显示.htaccess等隐藏文件的方法
ErrorDocument 404 /404.php3、控制面板设置404
[attachment=80797]

[attachment=80798]

[attachment=80799]

4、验证404页面,状态码也是404
[attachment=80800]













展开
收起
游客nm6mpjb2722bc 2015-08-04 06:24:04 6489 分享 版权
1 条回答
写回答
取消 提交回答
  • 学习了。。。
    2015-08-06 05:05:03
    赞同 展开评论