原文网址:https://www.youyong.top/article/1158e2394171
云服务器 ECS Apache环境下配置 404 错误页方法
原文网址:https://www.youyong.top/article/1158e2394171
云服务器 ECS Apache环境下配置 404 错误页方法
原文网址:https://www.youyong.top/article/1158e2394171
1、在 Apache 配置文件 httpd.conf 中设置:
AllowOverride All;
备注:设置为 All 时,所有具有 ".htaccess" 作用域的指令都允许出现在 .htaccess 文件中。
AllowOverride 参数介绍:
2、在网站目录下新建一个文件 .htaccess ,文件中写入:ErrorDocument 404 /404.html,在网站根目录下放置自定义的 404.html 网页;
备注:/404.html 这个错误页的路径可以自行修改。
3、重启 Apache 服务,参考命令:service httpd restart。
4、测试访问不存在的路径,查看自定义 404 设置是否生效:
共 0 条留言
阿里云·业务运营团队内部的前端构建和工程化工具 Dawn开源
tomcat报warinig Unable to add the resource at [] to the cache
Apache 出现 winnt_accept: Asynchronous AcceptEx faile?
CentOS 6.5系统下 Apache 如何配置 https 服务?
iPhone X 跌破发行价,苏宁200亿入股恒大 | 财经日日评
资深黄牛现身说法:iPhone X价格秒变不停,就像炒股一样
手机扫一扫
分享文章