Howdy - having been in marketing for years and I have seen some incredible successes (yeah a couple of failures). But nonetheless, I felt it was high time I stopped writing for others and got down to business. My forte is to look at a clients site and tell them (with tact) what the problem is and why they aren't converting. But I digress, it was high time I put my own madness to my methods (bw?).
This being the only forum I subscribe to (DP doesn't count.. 8| ) I decided to help those who may be hurting for answers. As I promised the big "N" I would post this. Now, some of you are in the know, and some of you may be wondering "wtf are all these 404 errors?" I came up with a little script to help out with that. You will need to have access to upload to your site, as well I urge you to create an email account named 404error(at)yourdomain.com (weird but I cant put email addresses in here - this may be tougher than I thought to post - ok -I see I can't use an AT symbol so wherever you see (at) replace it with the symbol.
The new email address will become beneficial as you start to receive prob a hundred emails a day about your site. You may be missing an image, an older file - what have you - once it is up - you're gonna start getting emails... so, set up your email address first - another suggestion is to create a folder and a rule in Outlook so all the 404 error messages get dropped there.
It will also send you the IP addy of the person or bot attmepting to scope your site - very nice when it appears someone is trying to find your thankyou page. It willl come back and tell you what it was they were looking for...
So here it comes:
1. copy this and paste this into a text file (use notepad) - save it as "404error.php"
2. change the YOURWEBSITENAME.??? to whatever your wbesite name is you are applying this to
3. Save and upload to the root or directory you wish
4. edit your .htaccess file by adding this line: ErrorDocument 404 /404error.php
5. Upload both files to your server and then click on your website - you'll see you can type in whatver crazy crap and it reverts back to the 404 erorr page. You can customize this page as well to fit in your site scheme - go to surviveprisonjail.com and type in something idiotic - you'll see... Yeah - if you like this - buy me a beer, eh!
(also if you want to fix the 301 redirects you'll have to pm me - it wont show up here - I'm a new noob 8))
OK - here ya go:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="XHTML namespace">
<head><link rel="shortcut icon" href="favicon.ico" />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title> YOURWEBSITENAME | File Not Found </title>
<META NAME="copyright" CONTENT="This code is copyright by NC Design | All Rights Reserved">
<meta name="author" content="NC Design - Free Website Templates | Free HTML Web Templates | Free Website Graphics ">
</head>
<body>
<font size="2" face="arial">
<b>TITLE OF THE ERROR PAGE</b><br /><br />
The page you are looking for does not exist. PUT SOMETHING MEANINGFUL IN HERE - OR MAYBE SELL THEM ON AN ITEM</font>
<?php
$url = $_SERVER[ "REQUEST_URI" ];
$referrer = $_SERVER[ "HTTP_REFERER" ];
if ( $referrer == "" )
$referrer = "Unknown";
if ($url!= "/sitemap.rdf"
&& stristr($url, '/_vti_bin/') == FALSE
&& stristr($url, '/sitemap.xml') == FALSE
&& stristr($url, '/MSOffice/clt') == FALSE
){
mail("404_error(at)YOURWEBSITENAME.com", "Problem at YOURWEBSITENAME",
"Requested Page: " . $url
. "\r\nReferred By: " . $referrer
. "\r\nRemote Addr: " . $_SERVER["REMOTE_ADDR"] . " (" . $_SERVER["REMOTE_HOST"] . ")"
. "\r\n"
. "Cookies: \r\n"
. implode(",", $_COOKIE)
. "\r\nRequested URL: YOURWEBSITENAME.com " . $_SERVER["REQUEST_URI"]
. "\r\n"
,"From: potentialcustomer(at)YOURWEBSITENAME.com" );
}
?>
</body>
</html>
Did I mention I like beer???



Reply With Quote



