Probably all of us have seen the Error 404 message - the result of broken links and mistyped URLs. Maybe you've already been on some websites where the error pages are customised with own logo and message, and I'm sure you'll agree that it looks far more professional than the standard one.
This guide shows you how to set-up customised error pages for your WebsiteBaker installation.
To create customised error pages your webhoster features the Apache web server and allows to upload your own .htaccess file to your webspace.
Create the textfile htaccess.txt with the content shown below, upload it to the root directory of your WebsiteBaker installation and rename it into .htaccess (Note the . at the beginning of the file name).
<Files .htaccess> order allow,deny deny from all </Files> ErrorDocument 404 /pages/error404.php
The first part stops people viewing your .htaccess file. The second part tells Apache to redirect any 404 errors to the file "error404.php" assumed in pages directory located in the root directory of your domain (adjust the path to the directory where the WebsiteBaker config.php file is located).
Test it by calling a URL which does not exist on your domain like https://yourdomain.com/nirvana.html
400 Bad Request
401 Authorization Required
403 Forbidden
404 Not Found
500 Internal Server Error