How to create custom error pages ...

To use your own custom error pages you must first create the html page(s) you want displayed ... for simplicity we recommend that they are named the same as the error code for which they are to be displayed. i.e. 404.htm for the page to be displayed on a 404 error. Some common error codes are ...

  • 401 - Authorization Required.
    This document is displayed when a visitor supplies an incorrect username/password to a restricted area of your web site.
  • 403 - Forbidden.
    This document is displayed when a visitor tries to access an area of your web site which you have specifically forbidden access.
  • 404 - File Not Found.
    This document is displayed when a visitor requests a specific page and the page is no longer available (renamed or deleted).
  • 500 - Internal Server Error.
    This document is displayed when an error occurs while running a script.

Your website is hosted on an Apache based webserver. For a complete description of the ErrorDocument directive see http://www.apache.org

To activate your own error pages, you must ...

  1. Download the file called .htaccess from the root directory of your web site (if there is one already)
    It MUST BE downloaded in ASCII mode.
    Before making any changes make a backup copy - if this file is not correct your site may become unavailable.
  2. Using a text editor/Notepad [NEVER USE WORD/WORDPAD] add the following line:
    ErrorDocument ErrorDocumentNumber FullUrl
    where ErrorDocumentNumber is the Apache number e.g. 404 and FullUrl is the full http location of your error page.
    e.g. ErrorDocument 404 http://www.yourdomain.co.uk/404.htm
  3. Save your .htaccess file and the upload it to the root of your website, again using ASCII mode.
  4. Test it. First by going to your home page. Then go to a page that will force the error page to be displayed.
    For example, assuming a page called test404.html does not exist in your site, enter into your browser address bar http://www.yourdomainname.co.uk/test404.htm
    Your new 404 error page will be displayed.

If after uploading your new .htaccess file, your web site becomes unavailable, restore the .htaccess file from your backup. You did make a backup - didn't you ? then start again from [2].

Microsoft assumes you would rather see their 404 message instead of the 404 message designed by the web site owner. To change this, in Internet Explorer choose Tools > Internet Options, Advanced, Browsing - uncheck 'Show friendly HTTP error messages'
  • 9 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

Do your CPanel hosting accounts come with BoxTrapper ?

At present we do not offer a BoxTrapper based spam prevention solution. BoxTrapper is based...

How do I access the CPanel control panel ?

Your CPanel control panel is accessed by a web browser at http://{domain}/cpanel i.e. if your...

Setting up easy webmail (Horde) access on CPanel

Alternative ways of accessing webmail ... Our standard CPanel method of accessing the webmail...

Cannot publish site with Frontpage Extensions, front page reporting incorrect password

Problem: I can no longer publish a site with Frontpage Extensions it says I have the wrong...

What is the server path to my files ?

The path to your files will vary depending on the control panel you use... Plesk (linux)...

Powered by WHMCompleteSolution