Hey guys,
I have a problem with one of my sites, I am getting nearly 1000 404 error page hits a day.
Whats the best tool / bot to go thru the site and try and find where its coming from?
Thanks
Dave
Printable View
Hey guys,
I have a problem with one of my sites, I am getting nearly 1000 404 error page hits a day.
Whats the best tool / bot to go thru the site and try and find where its coming from?
Thanks
Dave
Your hosts stats package should have a report letting you know where the broken links on your site are.
Alternately, if you want to try and monetize that traffic, throw a link to http://www.condom404.com in your .htaccess file :)
Regards,
Lee
Dunno,
but I wrote a script filtering out the 404 errors, writing it to a file where I save the file requested and the http_referrer and then redirecting it to my index.html
DEVELISH
Sounds odd but when looking through a few peoples server/site admin I have found them lacking in the reporting tools area.
A lot of people don't have access to true raw data and I guess they have no clue they should. As a standard, very basic part of the purchased package, if you don't have it, I would say you got squat with what you paid for.
Whats the best tool / bot to go thru the site and try and find where its coming from?
i do quite well out of 404 hits so i dont worry about where they come from. i should do really.
Armpit - Run a stats utility or anilizer like this: http://www.freedownloadscenter.com/W...tats_2003.html for a few weeks and then look over the data.
You will have a better understanding of your traffic
Thats what I did
edit .htaccess file and add the following line
where error.php is the next file to create
error.php:
replace "yourdomain.com" and "yourpage.html" with the domain and file you wish to redirect to in case of 404 error.
Replace "/full/path/to/log/" with the full path to the directory where you want to place the logfile (in this case 404.log) - I put it where my main index.html is.
create a file called 404.html and upload it to where the fullpath points to and give it write access (chmod 0777 is easiest but content visible from outside)Code://get referring page
$referer = strtolower($_SERVER[HTTP_REFERER]);
//which page was called?
$error = $_SERVER[REDIRECT_URL];
//put toghether the information we want and separate it with a |
$error = $error.'|'.$referer."\n";
//full path to the logfile
$handle = fopen ('/full/path/to/log/404.log', "a+");
fwrite($handle, $error);
fclose ($handle);
//redirect user to the correct page
header("Location: http://www.yourdomain.com/yourpage.html");
?>
Now upload all three files to where they belong to (.htaccess to document_root directory, error.php where you point to it in .htaccess and 404.log where you point to in error.php)
This gives you a log in the format of
|
:develish:
Thanks guys!!
Thats waht I was looking for
Cheers
Dave
& Lee..... Isn't all your traffic 404...err I mean its an error that they actually arrived at your domain right ?????? ....juz kiddin'
The conclusion to this was....
My custom favicon.ico had not been uploaded to that particular site, so it was creating a 404
Thanks for your help guys
Problem solved
:)
Dave