How to set up custom error pages in .htaccess for your Apache server (ErrorDocument)

October 26, 2018

If you want to set up a custom error page (for example when a 404 error happens) you can define what file to serve in your .htaccess file

ErrorDocument 500 "Show a plain text message"
ErrorDocument 401
ErrorDocument 404 /error_files/your_404_error_file.htm