Single ErrorDocument directive to catch all errors (.htaccess)

前端 未结 4 1935
感情败类
感情败类 2020-12-15 15:33

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         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-15 16:11

    Rather than passing in the error status code, you can pick it up in your script via the REDIRECT_STATUS environment variable (set by Apache). See: http://httpd.apache.org/docs/2.0/custom-error.html

提交回复
热议问题