Parveez_70209
Jun 04, 2014Nimbostratus
Irule to Include Session-Persistence into /retail Instance
Hi,
Into the below Irule, the session persistence is mapped only with /storeperform extension, but now the requirement is to add the same rules even to /retail extension, kindly guide how I will modify the existing Irule.
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
}
}
} else {
do not perist any other requests
persist none
}
}
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 } }
========================================
Kindly guide as I am starting out the concepts slowly with Irule.
Thanks and Regards Parveez