Wednesday, May 4, 2011

How To Create a Custom 404 Page on Apache

Apache makes it easy to create a custom 404 page for your Web server. Simply edit the file and then change the config file to point to it.
Difficulty: Easy
Time Required: 15 minutes
Here's How:
  1. Create a Web page that will be your 404 document.
  2. Open yourhttpd.conffile for editing (you'll probably have to login as root to edit it).
  3. Find the line that reads
    ErrorDocument 404 /404.html
  4. Change the third entry to the URI you would like to display, e.g.
    ErrorDocument 404 /new_404.html
  5. Restart your Web server.
What You Need:
  • Apache Web Server
  • Text Editor

No comments:

Post a Comment

Confused? Feel free to ask

Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.

Note:
Please do not spam Spam comments will be deleted immediately upon my review.