CUSTOM ERROR PAGE

 

One of the most common uses for a .htaccess file is to create custom error pages. The Apache server comes pre-installed with several different error pages, the problem with them is that they are quite frankly.... ugly. In order to use custom error pages we just need to add the following line(s) to our .htaccess file:

ErrorDocument errornumber /errorfile.extension

W e replace errornumber with the number corresponding with the Apache Error:

errorfile.extension gets replaced with the name of the file you wish to use as your custom error page. You can place this file anywhere on your server, as long as you specify the directory it is in if it isn't in the root directory.

Here are a few examples:

ErrorDocument 404 /404.php
ErrorDocument 401 /errorpages/401.shtml
ErrorDocument 500 /errorpages/500/500.html

 

Hosted by www.Geocities.ws

1