Trap And Get Notified: A Practical Solution To 404 Errors With PHP
(Page 1 of 5 )
Tired of seeing the same 404 errors in your log files? In this article Matt uses .htaccess and PHP to combat nasty 404 errors and get notified about them immediately as they occur.In this tutorial you will find out how to create customised error pages such as the infamous 404 and be notified by email when one of these error pages is shown on your site. Although .htaccess is traditionally used for security on websites, it can actually be used for many other purposes -- one being error document handling.
Although you can use the server's customised error messages, you never know when one is shown. With .htaccess, you can be notified as soon as any error page is shown and how the error page was called, ie: what the user entered in order for the error to be called.
This tutorial will only cover creating the 404 error page, but you will see how easy it is to actually create more, for example 401, 403 and 500 errors, etc.
Next: Creating the .htaccess file >>
More Apache Articles
More By