Results 1 to 10 of 10

Thread: 404 Error Page

  1. #1
    In2 Piss & Pits ArmpitLover's Avatar
    Join Date
    Mar 2006
    Location
    Los Angeles, CA
    Posts
    854

    404 Error Page

    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
    Domain inventory sale.


  2. #2
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635
    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


  3. #3
    Life is a dick and when itīs get hard---just fuck it... DEVELISH's Avatar
    Join Date
    Jul 2005
    Posts
    2,367
    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
    :-D


  4. #4
    Gay is the new Black
    Join Date
    Jun 2006
    Location
    Columbia, SC
    Posts
    1,561
    Quote Originally Posted by Lee View Post
    Your hosts stats package should have a report letting you know where the broken links on your site are.
    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.
    Be Who You Are!


  5. #5
    In2 Piss & Pits ArmpitLover's Avatar
    Join Date
    Mar 2006
    Location
    Los Angeles, CA
    Posts
    854
    Whats the best tool / bot to go thru the site and try and find where its coming from?
    Domain inventory sale.


  6. #6
    marcjacob
    Guest
    i do quite well out of 404 hits so i dont worry about where they come from. i should do really.


  7. #7
    Gay is the new Black
    Join Date
    Jun 2006
    Location
    Columbia, SC
    Posts
    1,561
    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
    Be Who You Are!


  8. #8
    Life is a dick and when itīs get hard---just fuck it... DEVELISH's Avatar
    Join Date
    Jul 2005
    Posts
    2,367
    Thats what I did

    edit .htaccess file and add the following line

    Code:
    ErrorDocument 404 http://www.yourdomain.com/error.php
    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.
    Code:
    <?php
    	//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");
    ?>
    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)

    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

    <page-with-404-error>|<referring-page>


    :develish:
    :-D


  9. #9
    In2 Piss & Pits ArmpitLover's Avatar
    Join Date
    Mar 2006
    Location
    Los Angeles, CA
    Posts
    854
    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' <smooch>
    Domain inventory sale.


  10. #10
    In2 Piss & Pits ArmpitLover's Avatar
    Join Date
    Mar 2006
    Location
    Los Angeles, CA
    Posts
    854
    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
    Domain inventory sale.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •