Perlaccess : Tutorials
Internal Server Errors (8.10)
by Jacob A. Wheeler
http://www.bigresources.com

Trapping Internal Server Errors

(.htaccess file - can create in notepad, or dos 'edit')
ErrorRedirect 500 http://www.domain.com/500.html

NOTE: Be sure to update domain.com with your domain name!

The above code, when placed in your htaccess file, will intercept all 500 Internal Server errors and redirect the user to a page you specify. In this case, the user will be redirected to a 500 page, located at: http://www.domain.com/500.html. Custom server error pages allow you to automatically notify you of the error, but embedding an SSI script, or even doing something as simple as redirect the user to a custom error script. Which emails/pages you of the time/place of the error. Below is an example of how you can redirect the user to a perl/cgi script.

(.htaccess file - can create in notepad, or dos 'edit')
ErrorRedirect 500 http://www.domain.com/cgi-bin/error.cgi

NOTE: Be sure to update domain.com with your domain name!

Complete List Of Error Codes

<< Back