Page 1 of 1

Prevent sessions from being stored if from a specific IP?

Posted: Wed Apr 21, 2010 6:11 pm
by dmpp
I have installed PHPmyFAQ on a site, and we're having a few small database issues.

Our search engine (HT Dig) is hitting the FAQ system constantly, and is causing these problems

1. It is exponentially increasing the number of views of all the FAQ's. Some of them are at 1200 views.
2. It is exponentially increasing the number of sessions in the "faqsessions" table.
3. the statistics in the admin panel are therefore inaccurate.

So, is there a way to prevent a specific IP from affecting the views and sessions? We still want the search engine to spider the content though.

We are running 2.6.3.

Re: Prevent sessions from being stored if from a specific IP?

Posted: Thu Apr 22, 2010 6:51 am
by Thorsten
Hi,

please add the HT dig user agent to the "bot blacklist" which is in the file config/constants.php:

Code: Select all

/**
 * Bot Blacklist
 *
 * @var array
 */
$botBlacklist = array(
    'nustcrape',
    'webpost',
    'GoogleBot',
    'msnbot',
    'crawler',
    'scooter',
    'bravobrian',
    'archiver',
    'w3c',
    'control',
    'wget',
    'bot',
    'spider',
    'Yahoo! Slurp'
);
If you tell me the user agent of HT dig, I can add this user agent in the 2.6.5 release.

bye
Thorsten

Re: Prevent sessions from being stored if from a specific IP?

Posted: Thu Apr 22, 2010 8:45 pm
by dmpp
User-agent: htdig
:D

Re: Prevent sessions from being stored if from a specific IP?

Posted: Fri Apr 23, 2010 7:22 am
by Thorsten
Hi,

thanks, added into 2.6.5. :-)

bye
Thorsten