Error Documents

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

Share your love

Leave a Reply

Your email address will not be published. Required fields are marked *