PDA

View Full Version : how do you make a custom 404 error page



spideyjvc
10-09-2005, 11:49 PM
How do you make one?
you know, like what yahoo and google had, that if you type in "Google.com/*insert anything*" it has a custom 404 error page...literally, anything and it will come up with the custom page, so I want to know how to make one

Twey
10-10-2005, 04:49 PM
There should be a directory on your webserver with error pages in. In Apache/*n*x the default is /var/www/error/. In this directory there are a number of error pages. Just edit the one you want.

ddadmin
10-10-2005, 11:11 PM
A more common way is just to create or edit your .htaccess file, by adding the below:

ErrorDocument 404 http://www.mysite.com/error.htm

This way, any page not found errors redirects the user to the above URL. For more info on .htaccess, see: http://www.javascriptkit.com/howto/htaccess.shtml