Originally posted by Apache's httpd.conf
#
# Customizable error response (Apache style)
# these come in three flavors
#
# 1) plain text
#ErrorDocument 500 "The server made a boo boo.
# n.b. the single leading (") marks it as text, it does not get output
#
# 2) local redirects
#ErrorDocument 404 /missing.html
# to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
# N.B.: You can redirect to a script or a document using server-side-includes.
#
# 3) external redirects
#ErrorDocument 402 http://www.example.com/subscription_info.html
# N.B.: Many of the environment variables associated with the original
# request will *not* be available to such a script.
If you have access to the config file, you can follow add your ErrorDocument directives right below that section, if you want.
If you don't have access to the config file, but you're allowed to use .htaccess files, you can create one in your "web root" directory, and add lines like the following:
Code:
ErrorDocument 500 /booboo.html
ErrorDocument 404 /missing.html
ErrorDocument 403 /backthefuckup.html
The paths to the files should be full paths. For example, if you want to keep all the error documents in their own directory called "errdoc", you'll need to do this:
Code:
ErrorDocument 404 /errdoc/404.html
Bookmarks