Forum Moderators: buckworks

Message Too Old, No Replies

How to deal with cart's session Id's

Is ther a way to re-write the session ID out for the bots?

         

WebFusion

2:06 pm on Aug 22, 2003 (gmt 0)

10+ Year Member



Hello all,

Ok...after 9 weeks of custom programming, testing, etc. etc., my new site with custom built shopping cart/affiliate system is nearing launch.

Here's my question....the affiliate system uses both cookies and sessing ID's to track referrals for the affiliates. Are session Id's still a big no-no for crawlers, and, if so, what is the best way to deal with it?

Erik

netcommr

2:48 pm on Aug 22, 2003 (gmt 0)

10+ Year Member



What I have done in the past is name my redirect/tracking script without an extention, then add the variables to the url as a subfolder would appear, such as

domain.com/cgibin/script.cgi?x=id&y=variable&z=foo

can be written as

domain.com/cgibin/script/id-variable-foo

In the cgibin the 'script' is a script, not a folder. The Apache server will pass 'id-variable' to your script.

This was done with Perl on a Linux machine, I do not know if this works on all systems with Apache.

Below is the code snippet,


my ($customer,$account,$destination) = split /-/, $ENV{'REQUEST_URI'};

#this strips /cgibin/script/ fron the $customer variable
$customer =~ s/.*\///g;

1 thing I would suggest. Very early in your script check for a valid account, else redirect to home page or other... (this can save big on server load)

if (defined $accounts{$account}) {

} else { $account = "not defined"; print "Location: [$ENV{'HTTP_HOST'}\n\n";...] &savedata; exit; }

If your setup is different, let us know what you have and someone may post a better solution for ya.