Knowledge Base - FAQ

Question: Setting up custom Apache error documents.

In our default setup, you can use the following in the /etc/httpd.conf configuration file. If you've customized your apache install at all, you should be aware of the location of your httpd.conf. (Note that you can also put these in .htaccess files on a per-directory basis.) The format is "ErrorDocument <error-code> <URL>". Most, but not all of these require a relative URL.
    ErrorDocument 400 /errors/badreq.html
    ErrorDocument 401 /errors/noauth.html
    ErrorDocument 403 /errors/forbid.html
    ErrorDocument 404 /errors/missing.html
    ErrorDocument 500 /errors/conferr.html

You can also redirect people off of your site using an external URL.
    ErrorDocument 403 http://www.kattare.com/

Do not forget to restart apache after changing the config with an 'apachectl restart'.

Last Modified: May 02, 2005


Kattare is Trustwave Certified and Safe Harbor Certified | Rated Safe For Kids by ICRA | All Rights Reserved Worldwide
Copyright © 1997 - 2012 Kättare Internet Services | Processed in 0.014 seconds by pyramid-06 in Corvallis, Oregon