Hack

Error Documents

September 12, 07 by ReniX

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 and Enjoy:
  • Digg
  • Technorati
  • del.icio.us
  • StumbleUpon
  • Ma.gnolia
  • ThisNext
  • co.mments
  • NewsVine
  • Slashdot
  • SphereIt

Thanks for visiting! If you're new here, you may want to subscribe to my Rss Feed. This blog posts regular Internet news, updates for apps, security, ideas, hacks, quick fixes and everything about hi-tech. Go ahead, subscribe to our feed!

Interesting Articles

This entry no have comments... but you can be first.

Leave a Reply

Close
E-mail It