单ErrorDocument指令捕捉所有错误(的.htaccess)

编程入门 行业动态 更新时间:2024-10-24 08:19:51
本文介绍了单ErrorDocument指令捕捉所有错误(的.htaccess)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有什么样通配符指令捕捉一切可能的错误和处理他们在一个单一的自定义错误页?

Is there something like a wildcard directive to catch all possible errors and deal with them in a single custom error page?

ErrorDocument 404 /error.php?code=404 ErrorDocument 403 /error.php?code=403 ... ErrorDocument NNN /error.php?code=NNN #possible use of RegExp?

我知道我可能不会被处理了很多在这里自定义错误页,但我很好奇这个问题。

I know I probably won't be dealing with a lot of custom error pages here, but I'm curious about this.

推荐答案

这是不可能的。你需要有一个的ErrorDocument 指令对各状态code要处理不同的比默认的错误处理程序。

That is not possible. You need to have a ErrorDocument directive for each status code you want to handle differently than with the default error handler.

更多推荐

单ErrorDocument指令捕捉所有错误(的.htaccess)

本文发布于:2023-11-01 23:19:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550697.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:指令   错误   ErrorDocument   htaccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!