How to personalize 404 error in Apache
By bgomes
In this post i will explain in 3 easy steps how to personalize a 404 error in Apach server. After some time searching in Internet, discovered that the solution was fairly easy. Knowledge that I will share with you here. :)
To set up a error page is necessary to follow the following steps:
1. Chose a error page of your choice, there are several example pages in the web, its only necesar make a little search in google to find then, for example you can find here some interesting pages:) In other hand if you decide to make a page from scratch, here are some tips how to create a 404 page user-friendly and efficient.
2. Rename the chosen page to 404.php and puts it in the upload directory of Apache, in my case is /var/www.
3. Find the configuration file of the Apache (httpd.conf, in my case is located at /etc/apache2, if you do not know the location of your file, you can search it using the command: locate httpd.conf) and add/edit the following line: ErrorDocument 404 /404.php. Now the browser is redirected to the file 404.php when 404 error occurs.
And its done, if you make all the steps and everything goes well, when a 404 error happens, the page chosen by you will be presented.
Original Portuguese version here
Comments
No comments yet.