Home Index

Welcome, Guest
Welcome, Guest. Please login or register.
February 04, 2012, 02:22:24 pm
Search:  
Advanced search
WJD Forum Index  |  WestHost Related  |  .htaccess Files  |  Topic: Custom Error Pages
Pages: [1] |   Go Down
Print
Author Topic: Custom Error Pages  (Read 3987 times)
Shawn Sorrell
Administrator
Jr. Member
*****
Offline

Gender: Male
Posts: 64



WWW
« on: March 02, 2005, 11:01:39 am »

WH has a program called Apache Error Messages 1.0. It can be found and installed under Site Manager > Site Applications > Miscellaneous.  Once installed the program is password protected using your main username password combo that you use to access your Site Manager. I theory this program makes changes to your apache config files and then restarts apache. I have not had much luck with using the program.

The same effect can be optained by using your own .htaccess files.  This may come in handy when you want to create say a 404 page not found custom message for a sub directory under your main home directory.  All you need to do is create an .htaccess file with one of the following examples.

1) plain text - The single leading (") marks it as text, it does not get output
Code:
ErrorDocument 500 "The server made a boo boo.

2) local redirects - to redirect to local URL /missing.html
Code:
ErrorDocument 404 /missing.html

You can redirect to a script or a document using server-side-includes.
Code:
ErrorDocument 404 /cgi-bin/missing_handler.pl

3) external redirects - Many of the environment variables associated with the original  request will *not* be available to such.
Code:
ErrorDocument 402 http://some.other-server.com/subscription_info.html


These pages will give you more information on the whole process. Both pages are also linked to in the WH Apache Error Messages interface.
Apache's Custom Error Response Help
World Wide Web Consortium's HTTP Status Code Definitions
Logged

Shawn Sorrell
Remember I am not an expert but a jack of all trades.  Information posted here should be used at your own risk. You are responsible for any changes you make to your account/website.
Pages: [1] |   Go Up
Print
WJD Forum Index  |  WestHost Related  |  .htaccess Files  |  Topic: Custom Error Pages
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC