Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove SID when someone comes from SE index with SID


Becki

Recommended Posts

Posted

Hi,

 

I have put in place measures to try and remove the SID appened URL's from the SE indexes and also measures to stop the SE indexing with SID's. While this is happening (hopefully) people can still come in with a SID from google. Is there a way of actually removing that SID when people come to the store? As at the moment if people come from google they will all share the same SID and cart! I have installed a contrib to change the SID when they login/checkout but up to this point there will be problems!

 

Many Thanks

 

Becki

Posted
Take a look at the session remover contribution.

 

Jack

 

thanks Jack although i already have this code from Chemo I think doing the same...

 

A common scenario is for store owners that were not aware of the "Prevent Spider Sessions" option to have several URLs indexed by spiders with the session ID appended. This situation is troublesome and there are a few options to handle referrals sent through the "wild" session ID URL.

 

However, the true solution to the problem is to REMOVE THE SESSION ID's from the search engine index! So, how hard is it? Pretty easy!

 

In includes/application_top.php find this code:

 

 

CODE

 

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

 

 

 

Under that paste this code:

 

 

CODE

 

if ( $spider_flag == true ){

if ( eregi(tep_session_name(), $_SERVER['REQUEST_URI']) ){

$location = tep_href_link(basename($_SERVER['SCRIPT_NAME']), tep_get_all_get_params(array(tep_session_name())), 'NONSSL', false);

header("HTTP/1.0 301 Moved Permanently");

header("Location: $location"); // redirect...bye bye

}

}

 

Which i hope is working, I know have spiders.txt updated and turned on in admin etc. Which log to I check to see if this code is working as it should?

 

This is fine but I think it'll take time for the indexed urls with SID's to get removed from google etc. In the meantime I want the SID removed when someone follows a link from a google indexed URL with SID. These contributions don't do that i don't think unless your a spider. So at the moment people will all have the same cart! Is there a way? anyone? :)

 

becki

Posted
use the session regeneration to avoid problems. It will create a new session id upon login.

http://www.oscommerce.com/community/contributions,4112

 

Hi,

 

I already have this from you thanks, the thing I want to sort is people not sharing the same cart up untill login. At the moment someone can follow the link from google, add something to the cart, then someone else follows the link from google and they immediately have a cart with the other persons item in!

 

Thanks

 

Becki

Posted
Hi,

 

I already have this from you thanks, the thing I want to sort is people not sharing the same cart up untill login. At the moment someone can follow the link from google, add something to the cart, then someone else follows the link from google and they immediately have a cart with the other persons item in!

 

Thanks

 

Becki

 

Yes I see, that will be hard to do. Because people may add the link with the session to their "favorites" and then will be hard to track, the referer is quite unreliable to say the least. Not only that but the worse case I experienced with a store was someone added within an information page a link with hard-coded session id. Because they simply wanted to put their special offers in that page, so they copied the link directly from their browser and placed it in the page description.

Posted
Yes I see, that will be hard to do. Because people may add the link with the session to their "favorites" and then will be hard to track, the referer is quite unreliable to say the least. Not only that but the worse case I experienced with a store was someone added within an information page a link with hard-coded session id. Because they simply wanted to put their special offers in that page, so they copied the link directly from their browser and placed it in the page description.

 

I'm sure they won't do that again!

Posted

Hi,

 

I just looked at my access log, I have:

 

66.249.65.161 - - [02/Apr/2007:04:28:53 +0100] "GET /products_new.php?amp;language=en&page=11&action=buy_now&products_id=206 HTTP/1.1" 302 - "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

66.249.65.161 - - [02/Apr/2007:04:29:04 +0100] "GET /index.php?manufacturers_id=3&page=1&sort=4a&osCsid=e008df1bccb72bc331b9e201cf4103d7 HTTP/1.1" 301 41992 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

 

Does the presence of the 301 mean that the code I'm using is working and that these url's will be removed from the SE index? There are still lots of instances of these osCid's in google though.

 

Should this be the way it is

products_new.php?amp;language=en
i.e the 'amp' part? I read somewhere ages ago about a fix for the Ultimates SEO's regarding the &amp - I haven't implemented it so wondered if this is correct? should it not be &amp?

 

Thanks

 

Becki

Posted

There is Spiders.txt that is used to check whether a spiders is in or its a visitor.

Kill session ID for spiders when set to true will result in oscid not being concatenated.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted
There is Spiders.txt that is used to check whether a spiders is in or its a visitor.

Kill session ID for spiders when set to true will result in oscid not being concatenated.

 

Satish

 

I have all this in place now - the trouble was the SE got there before I could so there are some links in google for example with the oscid, my problem is that I wanted the OSCSID to be removed when someone follows one of these links.....

 

Becki

Archived

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

×
×
  • Create New...