Custom Error Pages

I’ve had custom error pages on my site since it started, but today I added an awesome feature. It was great that the user was getting an error page with the same look and feel as my site, but I wasn’t getting any information from it.

I’ve added some PHP scripting so that whenever someone gets one of my error pages, I am sent an email with the URL they were trying to access, the referring page that has the broken link, time, date, visitor’s IP address. Now I’ll be able to track down broken URLs and resolve them.

Mr Bob’s Web Design has a great code generator and instructions for setting this up. When you do step 2, make sure to remove any blank lines at the end of functions.inc.php after pasting the code into it. If you don’t, you will get an error message on your error pages that the headers have already been sent.

3 thoughts on “Custom Error Pages

  1. This is SWEET! I’ve already found and fixed several scripting errors on my site that were creating links to pages that didn’t exist. I highly recommend this scripting for your error pages.

    Like

Leave a reply to more on Custom Error Pages at Mission: Communicate Cancel reply