Custom 404 error page on apache server
Difficulty level : medium
The 404 or Not Found error message is an HTTP standard response code indicating that the client was able to communicate with the server but either the server could not find what was requested, or it was configured not to fulfil the request and not reveal the reason why. 404 errors should not be confused with "server not found" or similar errors, in which a connection to the destination server cannot be made at all.
With this tutorial you will learn how to create a custom made 404 error page that fits your website design.
: Open your favourite html editor and create an html file with your preferred design and text on it (don?t forget to mention that this is a 404 error page and a link to your homepage so users can access your homepage by a single click.)
Save your html file as notfound.html.
: Open a text editor and create a file with the following line inside.
ErrorDocument 404 /notfound.html
(this line simple saying to our server to display notfound.html every time a 404 error occurring.)
Save this file as htaccess.txt
: Connect to your web server and with your favourite ftp upload those 2 files.
Rename htaccess.txt to . htaccess (Don?t forget the DOT)
ATTENTION for any reason DO NOT replace your old .htaccess with the new one.If you already have an .htaccess just add ErrorDocument 404 /notfound.html in it.
That?s all , easy and useful :)
eBoxNet - Vagelis Papaioannou