Hi
You can try this...
when ACCESS_SESSION_STARTED {
ACCESS::session data set session.custom.myvariable ""
}
when HTTP_REQUEST {
if { ! [ACCESS::session data get session.custom.myvariable] equals "" ] } {
log local0. "Detecting myvariable variable, not doing anything."
}
else {
set uri [string tolower [HTTP::uri]]
set clientcode [string range [URI::path "$uri/" 2 2] 1 end-1]
ACCESS::session data set session.custom.myvariable $clientcode
log local0. "NOT detecting myvariable variable"
log local0. "setting session variable to be $clientcode"
}
}