Forum Discussion
Irule to Include Session-Persistence into /retail Instance
Hi Nitass,
Got you, how about the below, will it work ?
when HTTP_REQUEST { persist requests that start with /storeperform if { [string tolower [HTTP::uri]] starts_with "/storeperform" } { Check if there is a RpSemSessionID cookie in the request if { [HTTP::cookie "RpSemSessionID"] ne "" } { Persist off of the cookie value with a timeout of 1 hour (3600 seconds) persist uie [string tolower [HTTP::cookie "RpSemSessionID"]] 3600 } else { Parse the jsessionid from the query string set jsess [findstr [string tolower [HTTP::query]] "rpsemsessionid=" 15 "&"] Use the jsessionid from the path for persisting with a timeout of 1 hour (3600 seconds) if { $jsess != "" } { persist uie $jsess 3600 return } } } elseif { [string tolower [HTTP::uri]] starts_with "/retail" } { Check if there is a RpSemSessionID cookie in the request if { [HTTP::cookie "RpSemSessionID"] ne "" } { Persist off of the cookie value with a timeout of 1 hour (3600 seconds) persist uie [string tolower [HTTP::cookie "RpSemSessionID"]] 3600 } else { Parse the jsessionid from the query string set jsess [findstr [string tolower [HTTP::query]] "rpsemsessionid=" 15 "&"] Use the jsessionid from the path for persisting with a timeout of 1 hour (3600 seconds) if { $jsess != "" } { persist uie $jsess 3600 return } } } } when HTTP_RESPONSE { Check if there is a RpSemSessionID cookie in the response if { [HTTP::cookie "RpSemSessionID"] ne "" } { Add persistence record using cookie value with a timeout of 1 hour (3600 seconds) persist add uie [string tolower [HTTP::cookie "RpSemSessionID"]] 3600 } }
Thanks and Regards Parveez
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com