Trying to replace the header host value if it doesn't match 2 conditions
I am trying to write an irule that will replace the header host value if it does not meet 1 given value or a 2nd given value. I tried the below irule based on info I gathered from various posts but it does not like the syntax. I am using version 13.1.1.2
when HTTP_REQUEST {
if { ([HTTP::header host] not "abc.host.com") or \
([HTTP::header host] not "xyz.host.com") } {
HTTP::header replace Host "abc.host.com"
}
}
If I try to save the above rule, I get this error: 01070151:3: Rule [/Common/rule_abc_host_header_replace] error: /Common/rule_abc_host_header_replace:2: error: [parse error: PARSE syntax 51 syntax\ error\ in\ expression\ \"\ (\[HTTP::header\ host\]\ not\ \"abc.host.com\")\ or\ \\\n\ \ \ \ \ \ \ \ \ (...\":\ looking\ for\ close\ parenthesis][{ ([HTTP::header host] not "abc.host.com") or \
([HTTP::header host] not "xyz.host.com") }]