Web Servers General Talk - URL-based session IDs, regex, and search-engine spiders....

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers General Talk > May 2006 > URL-based session IDs, regex, and search-engine spiders....





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author URL-based session IDs, regex, and search-engine spiders....
D. Stussy

2006-05-20, 7:19 am

Q1: I have seen "PHPSESSID", "sessid", "sid", and even "s". I have not seen
but have heard of "jsessionid". What other common session ID names are there?

Q2: For rewriting by search engines and other spiders to eliminate them from
the overall URL, I have seen regex expressions like this:

(.*)?SESSID=(.*) -> $1
(.*)&SESSID=(.*) -> $1

Obviously, the first one is to eliminate it when the parameter is the entire
query string, while the second form is intended for when it is the trailing
part of a query string. These have the defect of cutting out other parameters
in the query string that may follow (and it is possible that one or more may).
Therefore, I know that this is technically wrong. In the meantime, I've been
using a regex for the session ID of "([:alnum:]*)", but lately, I've noticed
some systems generating other characters (dash, underscore, period, etc....)
into their ID strings. I dont' recall the correct way of stating a regex for
"everything except an ampersand" - but think it's like this:

([^&]*)

That didn't seem to work. Does someone know what I need? (Please share it.)
Thanks.
dk_sz

2006-05-23, 1:18 pm

> Q1: I have seen "PHPSESSID", "sessid", "sid", and even "s". I have not
> seen
> but have heard of "jsessionid". What other common session ID names are
> there?


AFAIK aspsessionid



--
best regards
Thomas Schulz
http://www.micro-sys.dk/products/sitemap-generator/
http://www.micro-sys.dk/products/website-analyzer/


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com