Forum Discussion
GahanP_31299
May 01, 2014Nimbostratus
just loading this iRule (named: virtual_selection), my data group is called "landing_uri"
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] starts_with landing_uri] } {
virtual [class match -value [string tolower [HTTP::uri]] starts_with landing_uri]
log local0.info "URI = [HTTP::uri] and 1st Virtual Match"
}
elseif { [HTTP::cookie exists MRHSession] } {
if { [class match [ACCESS::session data get -sid [HTTP::cookie value MRHSession] session.server.landinguri] starts_with landing_uri] } {
virtual [class match -value [ACCESS::session data get -sid [HTTP::cookie value MRHSession] session.server.landinguri] starts_with landing_uri]
}
}
}
though it seems to be complaining about the logic in the ELSEIF line 6 (I tried wrapping the Cookie name in "" but didn't help)
6: error: [undefined procedure: elseif][elseif { [HTTP::cookie exists MRHSession] }