Just another Perl shrine | |
PerlMonks |
Re: Need to remove session IDsby wolfi (Scribe) |
on Apr 10, 2004 at 03:16 UTC ( [id://344073]=note: print w/replies, xml ) | Need Help?? |
i may be totally under-thinking this, but a really brief and crude thought...just bypass your normal routines, if it's a bot.(I'm assuming, you probably want to do less work on them anyways.)...and just split it into two sections. Bots and Not-Bots.
it probably be easier to use the whole googlebot\2.1 stuff in a $variable associated with some array - than putting too many | or statements into that regex... but i'm being lazy and non-thinking at the moment. one word of caution before using something like this-> any and all $ENV variables need to be cleaned up; One needs to ensure that they have no evil characters in them. As a thought for the directories you have there: $ENV{'PATH_INFO'}=~/^([a-zA-Z_0-9]+\/?)*$/ one can't rely on the $ENVironmental variables too much, but in this case, it probably would work.
In Section
Seekers of Perl Wisdom
|
|