Web Developer Logo
Custom 404/401 Errors

Introduction

This tutorial shows you how to setup your Apache website server to redirect Page Not Found (404) and Access Denied (401) errors to a personalized webpage.

Instructions

  1. Open a page or the pages where you want the script to be loaded onto.

  2. Insert the following into these page(s):
    <script language="javascript" type="text/javascript" src="YOUR_FILE.js"></script>
  3. Open a word processor such as SimpleText or Notepad.
  4. Modify the following where HTML_TXT appears, and replace it with your own HTML code:
    document.write("HTML_TXT");
    Keep in mind that the following symbols are not permitted without placing a "\" in front of them within the document.write("");
    , " ( ) { } -

© 2002-2009 Some Rights Reserved Report an Error | Return to Top