Everyone at some point has been browsing trough google or their favorite search engine and clicked on a link just to go into a white page with the words ???404 Error??? up on top. After this the only thing you have is to hit the ???Back??? button on your browser. As a user, this means that you go backand try another link. As a developer do, it means that you lost a potential clients, and that you have a glitch in ξyour application that you are not aware of.
You can set upt a custom 404 page using your apache .htaccess file. Here is how to do this:
- Access your server via FTP
- Make sure that you can see hidden files
- Locate for .htaccess
- If .htaccess does not exist go ahead and create it
- Open the file
- Type: ErrorDocument 404 /404.php
- Save the file
- Now you can go and edit this file so that you can have a custom error page.
That is all that you have to do in order to set up your server to have a custom 404 page. Use your imagination on this one, for examle you can have a search function or related pages to what the user was looking for. You can also have this page email you so that you become aware of the situation.
Hope this helps, any questions or concerns can be submitted below.