Tag Archive | "custom error"

Tags: ,

How to setup custom error via .htaccess

You can modify .htaccess file under your website root to setup custom error. The syntax is like that:

ErrorDocument <3-digit-http-status-code> Action

Following are some samples:

ErrorDocument 500 /cgi-bin/500.html
ErrorDocument 500 "Sorry, our script crashed."
ErrorDocument 500 http://www.yourdomain.com/
ErrorDocument 404 /error/not_found.html

Ref: http://httpd.apache.org/docs/1.3/custom-error.html


Posted in Linux-Apache-PHPComments (0)