Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What is the verdict on dealing with the googlebot?


Rainguy

Recommended Posts

Posted

Everyday, between 50 and 250 logins/spiders, all showing those session ID's. What is the best thing to do? It kinda bogs down the site sometimes.

Posted

Hello,

 

Ive just been playing with trying to make oscommerce get rid of session ids and i think I have found something (I know nothing about PHP mind you!)

 

I have changed the following in html_output:

Code:

 

// Add the session ID when moving from HTTP and HTTPS servers or when SID is defined

if ( (ENABLE_SSL == true ) && ($connection == 'SSL') && ($add_session_id == true) ) {

$sid = tep_session_name() . '=' . tep_session_id();

} elseif ( ($add_session_id == true) && (tep_not_null(SID)) ) {

$sid = SID;

}

 

if (isset($sid)) {

$link .= $separator . $sid;

}

 

 

 

to:

Code:

 

// Add the session ID when moving from HTTP and HTTPS servers or when SID is defined

if ( (ENABLE_SSL == true ) && ($connection == 'SSL') && ($add_session_id == true) ) {

$sid = tep_session_name() . '=' . tep_session_id();

} elseif ( ($add_session_id == true) && (tep_not_null(SID)) ) {

$sid = NULL;

}

 

if (isset($sid)) {

$link .= $separator . $sid;

}

 

 

 

Now even with cookies off NO session IDs are generated - last night with web position gold spider got trapped in my site because of the session ids - still going after 3 hours! I made this changed and it returned my site urls in about 2 mins and exited the site!!

 

NOW I do realise that anyone now browsing my site without cookies will not be able to buy anything!! - but I think personally this is a good trade off. However someone might be able to write some elseif statements so that the $sid = NULL; only gets set when a bot is looking at the site (by IP or header??) - or maybe some kind of message to the end user telling them about cookies etc?????

 

HOWEVER my changes do seem to work BUT as i said i know nothing about PHP so am i missing anything serious problems with my site by changing this code???? I have checked my site with and without cookies and everything seems to function correctly! - any comments welcome!

 

My site is at:

http://www.self-test-kits.co.uk

 

and currently has the change made! The only problem i can see is that the "other" languages apart from the default english and the other currency pages will not get properly indexed???

 

Cheers,

 

Graham Wright

Graham Wright

________________

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...