有什么样通配符指令捕捉一切可能的错误和处理他们在一个单一的自定义错误页?
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.
上一篇:什么是隐藏在服务器上的文件的最好方法是什么?器上、文件、方法
下一篇:mod_rewrite的从codeigniter在子目录中删除的index.php目录中、codeigniter、mod_rewrite、index