Error Pages
Image from Hosting Services: Error Pages

The standard error pages can be very annoying. When you move a page in your site, visitors have no way of finding where you moved it to in the error page. With custom error pages you can get cool error pages that have the same layout as your site and get rid of the standard ones and replace them with one that will help redirect users to anypage you wish.

There are 5 kinds of errors that can occur, here is the list with the definition:
400 - Bad request 401 - Authorization Required 403 - Forbidden 404 - Wrong page 500 - Internal Server Error

First of all, you will need to create your errors pages. Put anything in them you would like, it doesn't matter. However I would suggest placing a link to your main page on it. Then upload your pages to your site in a sepertate folder and call it anything you'd like.

Now in your .htaccess file, (Please see the .htaccess tutorial to make one if you don't already have one.) copy the following as shown below. Don't wrap the text. You will need to change the folder name in the links to the one you used.

ErrorDocument 400 http://www.yourdomain.com/errordocs/400.html
ErrorDocument 401 http://www.yourdomain.com/errordocs/401.html
ErrorDocument 403 http://www.yourdomain.com/errordocs/403.html
ErrorDocument 404 http://www.yourdomain.com/errordocs/404.html
ErrorDocument 500 http://www.yourdomain.com/errordocs/500.html

Save your .htaccess file and upload it to your server in the main directory. Test it out to make sure it works.

Everything should work, if not, your server may not support this.


Close    To Top
  • Prev article-webmaster:
  • Next article-webmaster:
  • Now: Tutorial for Web and Software Design > Webmaster > Web Hosting > webmaster Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction