views:

185

answers:

1

Hello.

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.

+1  A: 

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.

Gumbo
Alright, kind of figured - I tried using some of the "tricks" usable on RewriteRule directives, but they only gave 500 errors. Thanks for clarifying.
Mike Valeriano