Home arrow Apache arrow Page 4 - Trap And Get Notified: A Practical Solution To 404 Errors With PHP
APACHE

Trap And Get Notified: A Practical Solution To 404 Errors With PHP


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.

Author Info:
By:
Rating: 4 stars4 stars4 stars4 stars4 stars / 7
August 13, 2002
TABLE OF CONTENTS:
  1. · Trap And Get Notified: A Practical Solution To 404 Errors With PHP
  2. · Creating the .htaccess file
  3. · Creating the PHP Error Document
  4. · Uploading The Files
  5. · Conclusion

print this article
SEARCH DEVARTICLES

Trap And Get Notified: A Practical Solution To 404 Errors With PHP - Uploading The Files
(Page 4 of 5 )

Using an FTP program, connect to your website and open the folder with which you wish to use the files. I suggest using the root directory. Upload config.php, 404.php and .htaccess using the FTP program. Make sure you use the ASCII transfer mode for the .htaccess file.

If you were unable to create the .htaccess file earlier and you had to save it as htaccess.txt, upload this in the same way as described above. Once the file is uploaded, rename the file to ".htaccess". This will now be accepted as the .htaccess file.

Now to test the code. Type the address of your website and add a path to a file which doesn't exist. You should see the 404 error page we created and you should also receive an email informing you of the error.
blog comments powered by Disqus
APACHE ARTICLES

- Programmatically Manipulating Microsoft Exce...
- Installing PHP under Windows
- Compressing Web Content with mod_gzip and mo...
- Compressing Web Output Using mod_deflate and...
- Setting Up Apache 2.0.45 to Parse PHP Pages
- Custom Error 404 Documents with PHP
- Using Apache and PHP on Mac OS X
- ASP: Active Sessions, Active Logins and Tota...
- Working With Oracle on Windows: Part 1
- The Quick-n-Dirty Guide to Setting Up Apache...
- Installing Apache With SSL: The Complete Gui...
- 7 Powerful .htaccess Customization Tips
- Trap And Get Notified: A Practical Solution ...
- One Way To Use Server Side Includes
- Using ForceType For Nicer Page URLs

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials