Combining variables in iRule (proper syntax)
Hi all,
I am working on the iRule where I need to dissect the URI query to extract value of the specific field (xyz). For example:
https://sitea.mycompany.com/login.aspx?abc=176560143&ClientNameSingleSite=xyz
I am able to set the target variable by doing the following:
set string [URI::query [HTTP::uri]]
set fields [split $string "="]
set name [lindex $fields 2]
however variable $name needs a "/" character added in the front of it to be matched against data group later.
I am not able to figure out the propper syntaxsys to do it all in one line so I i am setting a temp variable and then concatenating two string variables into one:
set temp "/"
set newname "$temp$name"
So,I am trying to eliminate two last lines and have $name variable set to contain "/" when variable is set initially. So far I have not been able to figure out the right way to do it, but I guess it should be something similar to this:
set name ["/"+[lindex $field 2]]
Can someone guide me on proper syntax for this.. Thanks.