Customizing Your 404 with Apache
Create a file called .htaccess in the root directory of the server (the one you refer to as '/') and enter your error handlers in the following format, one per line: ErrorDocument [3-digit code] [action] For example, you can point to a custom 404 page like this: ErrorDocument 404 /errors/custom404.html You can also simply have it display some other text: ErrorDocument 404 "Sorry, this page doesn't exist. Make sure you begin the text with a quote ("). Windows users have reported problems creating .htaccess files. Create a file named 'htaccess.txt', FTP it to your web host, and then rename it to .htaccess. You can even make your 404 errors more friendly for international visitors by displaying a page in their own language. Check out this Apache article.
|