PDA

View Full Version : Testing the Error Document


moonmoon
03-10-2009, 09:54 AM
When you're satisfied with your page, upload it together with your .htaccess file to your Custom Web Design (http://www.intellixmedia.com/web-design.htm) website. Then test it by typing a URL that you know does not exist. Your error page should load up. From this error page, test to see that the links here lead to the pages you intended it to lead.
The most common error people have with their custom error page is making a mistake in the URL they put in their .htaccess file. This leads the web server into a loop when a visitor tries to access a missing file. When a file cannot be found the server tries to load the file specified in your ErrorDocument directive. But that file does not exist too, so it tries to load the file specified in that directive. You get the idea.
Make sure you test your error file by typing in a non-existent URL. Do not test it by typing its real URL - that will of course work but it will prove nothing.
Another common error is to forget that your 404 Error Page may be loaded either from the main directory or from a subdirectory or even your CGI-BIN directory. When you put links on your 404 Document Not Found page, such as hyperlinks leading to other pages on your site or links to images (such as your logo), be sure that you use the full URL and not a relative link. That is, use things like

<a href="