3

There is a possibility to set a error page using the ErrorDocument separately like this:

ErrorDocument 403 /site.html
ErrorDocument 404 /site.html
ErrorDocument 500 /site.html

But is there a way to catch all errors with on-line command at once? I’ve tried with empty string and with “*”, but it did’t work.

elon
  • 113
  • 2
  • 9

1 Answers1

3

Not to my knowledge. You have to create a separate ErrorDocument handler for each of the HTTP status codes you wish to have a custom page for.

See Single ErrorDocument directive to catch all errors (.htaccess) on StackOverflow and Custom Error Responses on Apache's documentation.

runlevelsix
  • 2,609
  • 21
  • 19
  • created an `.htaccess` to catch them all @ https://stackoverflow.com/a/66259452/1442789 – AK_ Feb 18 '21 at 11:56