05-Oct-2015 22:48
HI Team,
I am a newbie on f5 irule..I am learning the irule thing now..One the thing i am facing issue as follows:
my i rule code is like this:
when HTTP_REQUEST { if{ [HTTP::header User-Agent]contains "iPad"} { pool pool2 } elseif{ [HTTP::header User-Agent]contains "Android"} { pool pool3 } else{ pool pool1 }
}
I am getting the error message like below:
01070151:3: Rule [/Common/acme] error: line 2: [parse error: extra characters after close-quote] [} { pool pool2 } elseif{ [HTTP::header User-Agent]contains "Android"} { pool pool3 } else{ pool pool1 } ] line 6: [parse error: extra characters after close-quote] [} { pool pool3 } else{ pool pool1 } ] line 7: [undefined procedure: pool pool3 ] [{ pool pool3 }
else{]
can anybody please help on this..where I am wrong on this since I have just copy paste form an existing working one..I have evaluation version of 11.3 for 90 days....the working one is lab licensed and 11.6..please help on this
05-Oct-2015
23:32
- last edited on
02-Jun-2023
16:06
by
JimmyPackets
Looks fine to me - try formatting like I have....?
when HTTP_REQUEST {
if { [HTTP::header User-Agent] contains "iPad"} {
pool pool2
} elseif { [HTTP::header User-Agent] contains "Android"} {
pool pool3
} else {
pool pool1
}
}
06-Oct-2015 00:04
yesssssss...it took now..many thanks..wanted to know did i miss anything?
17-May-2023 03:07
Just tried how you typed it originally and it failed for me too.
It's all about the formatting.