I am having a problem with googlebots and session ID's in a phpBB install. Here is a typical request from the Latest Visitors screen:
The problem is that the bots will continue to index the same page multiple times using a different SID each time. I have confirmed with Google that their bots don't "like" SID's and I was advised to disable them.~/forum/index.php?sid=591a5fac55d52ae258cdcc7d0a 316c91
I found a mod to the sessions.php file on the phpBB forums that is supposed to correct the problem but it hasn't done so entirely. Their site is down right now so I can't provide a link or go back for further info.
Here is the user_agent for the offending bots:
Here is the code for the mod that I installed in sessions.php (I added the text in red trying to add the user_agent shown above):Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Does anyone else have this problem or any ideas on correcting it?function append_sid($url, $non_html_amp = false)
{
global $SID, $HTTP_SERVER_VARS;
if ( !empty($SID) && !preg_match('#sid=#', $url) && !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') &&
!strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)') &&
!strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'slurp@inktomi.com;'))
{
$url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;
}


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks