wlepkin_98758
Dec 29, 2011Nimbostratus
F5 does not accept iRule
Hi, I'm new at iRules, and am having trouble with what seems to be a pretty basic rule, modeled after other rules I've seen both in our BigIP configuration and in DevCentral. The rule is:
rule myapps.jeppesen.com-citrixtest {
when HTTP_REQUEST {
if { [HTTP::header User-Agent] contains "CitrixReceiver" } then {
HTTP::redirect "https://myapps/PNAgent/config.xml"
} else {
HTTP::redirect "https://myapps/Citrix/XenApp"
}
}
}
I'm running BIG-IP version 9.4.6, and when I try to enter the rule via the command line, one line at a time, it likes the first and second lines, but when I enter the 'if' clause line (3rd line) I get the following error message:
BIGpipe parsing error: 012e0021:3: The requested attribute (if {) for 'rule' is invalid.
I've tried all different combinations of spacing, placement of braces, leaving out the 'then' and 'else', using 'string tolower', but every time it chokes on the 'if' clause. The rule is very similar to a rule I've seen discussed in DevCentral, with the addition of the 'else' clause. The problem must be something simple, but I just can't see it.
Anyone have any ideas?
Thanks much.