petak, 21. prosinca 2007.

Custom Error Pages

Creating custom error pages in PHP Fusion is easy. This article shows you how to create a custom 404 'page not found' error page but it can easily be modified to create pages for other ErrorDocument codes.

If have applied the page title optimisation mod your visitor will be presented with an informative page which matches the theme of your site AND which also has a HTML title tag of your choosing.

Step 1: Download the code for 404.php from the CVS Browser (click the disk).

Step 2: Edit and modify 404.php to meet your requirements.

Step 3: Upload 404.php to the root directory of your PHP Fusion installation.

Step 4: Create a .htaccess file if you don't already have one and add the following to it.

## Forbidden
ErrorDocument 404 /404.php

That's it - your done!

To create pages for other ErrorDocument codes: Download 404.php and rename it to whatever error code you have in mind and modify your .htaccess file accordingly. Possible inclusions are:

## Bad Request
ErrorDocument 400 /400.php

## Unauthorized
ErrorDocument 401 /401.php

## Payment Required
ErrorDocument 402 /402.php

## Forbidden
ErrorDocument 403 /403.php

## Not Found
ErrorDocument 404 /404.php

## Server Error
ErrorDocument 500 /500.php

## Bad Gateway
ErrorDocument 502 /502.php

For a more complete list view the HTTP/1.1 Status Code Definitions at

3 komentara:

madhuri kaže...

Creating a custom error page seems to be interesting and simple too just following these 4 steps it would make it successful.Really so exciting fren.
Cheers !
web design company

CVGi kaže...

Customized 404 page is quite good concept if users encounters non existing page of website but we need to make sure that link pointing to your main page, with a suggestion that the visitor can find what he/she wants there. In custom 404 page you need to use full url instead of relative link

amisha S kaže...

Customizing error page is quite surprising..It is really new to me..Very informative post..

Website Design Company


Sopranos Ruby Css Xhtml Cgi Calabria Rocky Oktoberfest Fencing