LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Catch all HTTP errors in Apache with ErrorDocument (https://www.linuxquestions.org/questions/linux-server-73/catch-all-http-errors-in-apache-with-errordocument-712839/)

timnp 03-19-2009 10:02 AM

Catch all HTTP errors in Apache with ErrorDocument
 
Hi,

I want to specify the same error page for all the different types of HTTP error. Maybe override it for certain ones.

What is the best way to do it with only a line or two that doesn't involve enumerating every possible error like this...

ErrorDocument 500 /othererror.html
ErrorDocument 404 /notfound.html
ErrorDocument 401 /othererror.html
ErrorDocument 403 /othererror.html

...and so on.

What is the directive to specify a default error page when no other error page is defined?

I tried a wildcard as the error code and I tried ommitting the error code altogether, it didn't like either.


All times are GMT -5. The time now is 06:49 PM.