ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to exclude favicon.ico from referrer list

November 07, 2008 4:20am

Subscribe [3]
  • #1 / Nov 07, 2008 4:20am

    freakyspider

    2 posts

    I have set up a page to list the referrer traffic to my blog. The code is given below.

    I find numerous calls to favicon.ico/ from various blogs and they’re clouding the proper traffic to pages on the site. How do I exclude any calls to favicon.ico from my stats? I’ve already put the term into my blacklist but that doesn’t seem to be doing anything.

    Here’s the code I’m using:

    <h4>Referrers</h4>
    
    <p><table border="0" width="100%" cellpadding="6" cellspacing="1"><br />
    <tr><br />
    <td>From</td><br />
    <td>To</td><br />
    <td>IP Address</td><br />
    <td>Date</td><br />
    </tr></p>
    
    <p>{exp:referrer limit="200" popup="yes"}<br />
    <tr class="row"></p>
    
    <p><td><div>{ref_from}</div></td><br />
    <td><div>{ref_to}</div></td><br />
    <td><div>{ref_ip}</div></td><br />
    <td><div>{ref_date format="%m/%d/%Y"}</div></td></p>
    
    <p></tr></p>
    
    <p><br />
    {/exp:referrer}</p>
    
    <p></table>

  • #2 / Nov 07, 2008 5:21am

    Ingmar

    29245 posts

    I don’t think there is a quick and easy way to do this. It would certainly make for a nice feature request, but for the time being you’d probably need some PHP to filter it out manually. That make sense? If you want I can move this to Howto so the community could help you hash something out.

  • #3 / Nov 07, 2008 4:33pm

    freakyspider

    2 posts

    Ingmar, the documentation on the exp:referrer module explicitly states that adding a URL to the Blacklist will exclude it from being recorded by the referrer module. But that’s not working. So I guess you can file it as a bug report.

    Quoting from here:
    http://expressionengine.com/docs/modules/referrer/index.html

    “ExpressionEngine maintains an editable Blacklist so that you can keep certain IP addresses, URLs, or even User Agents from being counted in your referrals as well as a Whitelist that will automatically let matches through. You may access this through the Blacklist/Whitelist Module in the Modules area.”

  • #4 / Nov 07, 2008 5:53pm

    Sue Crocker

    26054 posts

    freakyspider, a few questions for you:

    Which EE version and Build are you running? You can find that information at the bottom of any EE control panel page.

    How are you calling your favicon.ico file?

    What .htaccess rules do you have? What about extensions?

  • #5 / Nov 08, 2008 4:27am

    Ingmar

    29245 posts

    “ExpressionEngine maintains an editable Blacklist so that you can keep certain IP addresses, URLs, or even User Agents from being counted in your referrals as well as a Whitelist that will automatically let matches through. You may access this through the Blacklist/Whitelist Module in the Modules area.”

    This URL refers to referring URLs, I am afraid. So, if you get a lot of hits from http://example.com/foobar/ that you are not interested in, you can block this URL. It is not meant to exclude “referred” URLs, as it were.

    Answering Sue’s questions above should help us to help you find a solution, though.

  • #6 / Nov 08, 2008 12:03pm

    Ingmar

    29245 posts

    I have an additional question: Are you removing index.php? Using, perhaps, the file & directory method?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases