Error Documents

ads

404.jpg

These are very useful and allow you to specify a page that the user goes to if there is an error. The most useful way you could use this is with the “404 Page Not Found” error. You can provide the user a list of common links, a link to your homepage, an e-mail address or whatever you feel like!

You create this in the . htaccess file by including the following command, replacing the value in [square brackets]:

ErrorDocument [number] [path to document location]

So, for example, the Olate 404 page is done like this:

ErrorDocument 404 /errors/404.php

Instead of directing users to a page, you can display some HTML instead:

ErrorDocument 404 "Page Not Found

Return to the homepage

ads
Get our hottest stories to your inbox.
Check your inbox for a confirmation email.

Have something to add to this story? Share it in the comments.

Have something to add to this story? Share it in the comments.

Leave a Reply

Your email address will not be published.