Custom Error Pages on Apache

Custom Error Pages on Apache

Error pages, such as “page not found 404” or “forbidden 403” can customized. A customized error page can direct users to browse your site elsewhere. You can also explain user how to report the problem to you instead of the administrator of the whole web server.

© 2005 Tero Karvinen

.htaccess settings

Create a .htaccess under your home directory (/home/username/) under your web directory (public_html):

# $HOME/public_html/.htaccess
# Customized error pages -
ErrorDocument 404
ErrorDocument 403
ErrorDocument 500

where is your server and myname is your username.

Create the Error Page

Create a normal, static html page that is shown in the address you chose in .htaccess. For example, “$HOME/public_html/error_404.html”.

Tero’s Error Pages

See also

Posted in Old Site | Tagged , , , , | Comments Off on Custom Error Pages on Apache

Comments are closed.