on an apache server, you can add the following line to the .htaccess file in the root of your web server:
ErrorDocument 404 /404error.php
The last portion is the file that will get called anytime the server detects a 404 error. (the same thing can be done for a 403 error; permission denied). This can be a static web page or a scripted page. A few things to consider:
1. This file does not always get called from the root directory, so always reference the page off of the root. (/404error.php instead of just 404error.php in my example)
2. Also since this can get called from other directories, make sure all images/css/script files you reference are based off of the root directory (
Greg K posted this at 04:53—18th August 2007.
He has: 1,601 posts
Joined: Nov 2003
on an apache server, you can add the following line to the .htaccess file in the root of your web server:
ErrorDocument 404 /404error.php
The last portion is the file that will get called anytime the server detects a 404 error. (the same thing can be done for a 403 error; permission denied). This can be a static web page or a scripted page. A few things to consider:
1. This file does not always get called from the root directory, so always reference the page off of the root. (/404error.php instead of just 404error.php in my example)
2. Also since this can get called from other directories, make sure all images/css/script files you reference are based off of the root directory (
[This space intentionally left blank]
Cool Geek Supplies: www.ThinkGeek.com