| Error Codes | ||||
|
If you can't find your question, please let us know and we'll answer it in email.
What is an HTTP response code? HTTP response codes are the standard numbers associated web server error messages. An example is:
What does Code 404 Not found mean? It means that you had a request for a document in your site that did not exist. Typically this is the result of a bad URL in one of your documents which links to a non existent document, either a mistake, or one that you were planning on writing but haven't yet. Code 302 Redirected requests result whenever you specify a directory for a URL. For example, if you specify:
the server redirects the browser to request:
The server handles the redirection in this manner in conformance with HTTP standards. It is quite normal. How do a I customize error messages like 404 not found? You can customize your error messages by creating or editing your .htaccess file. But first you need to create the following html documents:
You can word the contents of these documents however you please. Now comes your .htaccess file. Inside your public_html directory, or one of its subdirectories, you may have a file named .htaccess. If an .htaccess file isn't already there, then you can either create one online using the pico command in ssh, or create one in a text editor and upload it to the server using an ftp program. Now add the following lines to your .htaccess file.
Make sure to replace where it says URL with the URL to that error message. For example, your .htaccess file may look something like this:
If you do not have your domain pointed to your account, you must use the fully qualified URL, like this:
You also have the option of just puting in the text or HTML to display in your .htaccess file. For example:
Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as "http" in front of it) Apache will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server. This has several implications, the most important being that if you use an "ErrorDocument 401" directive then it must refer to a local document. This results from the nature of the HTTP basic authentication scheme. |
||||
|
Hurricane Electric 760 Mission Court Fremont, CA 94539 |
FAQ Index Copyright © 1994 - 2004 Hurricane Electric. All Rights Reserved. |
Voice 510.580.4100 Fax 510.580.4151 Comments? info@he.net |