Wes_98712
Apr 18, 2006Nimbostratus
mapclass2node
I have the following v4 rule within the pool as a node select expression:
V4 CODE:
mapclass2node(findstr(http_uri, "srv=", 4, '&'), urlaff_retailcf)
The class looks as follows:
V4 CODE:
class urlaff_retailcf {
"srv2 10.34.238.31:80"
"srv3 10.34.238.26:80"
}
What I need to know is how would I handle this in v9? Something as follows?
when HTTP_REQUEST {
set my_uri [HTTP::uri]
set my_query [HTTP::query]
if {[HTTP::host] equals "www.somehost.com"} {
set my_findstr [findstr $my_uri "srv=" "&", 4]
node [findclass $my_findstr $::urlaff_retailcf " "]
}
}
I'm thinking that would work, but not sure of the syntax, if someone could proof it that would be great. For this legacy cold fusion site we have to persist based on the URI query looking for srv= which then maps back to a specific server, referenced in the class.
Thanks,
-wn