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 \
I am so accustomed to using irules for everything and I am not real familiar with Local Traffic Policy. However this looks like it will do what I need. I will test it and let you know. Thanks!
And it gave me this error: 01070151:3: Rule [/Common/rule_header_replace_abc] error: /Common/rule_header_replace_abc:2: error: [undefined procedure: HOST][HOST = [string tolower [HTTP::host]]]
I am too… But I’ve spent a good amount of time over the last year converting everything I can from iRules to Local Traffic Policies. Especially iRules that direct certain traffic to certain pools based on hostname, because it shows up much better on the Network Map.
Oh right, I should have know that as well. However it still does not work as it does not like something in the syntax. Also I am not triggering it based on the host. The item that is supposed to trigger the event is if the http header does not have a specific hostname in the header.
No, it still gives an error when I try to save the rule. The error is: 01070151:3: Rule [/Common/rule_abc_host_header_replace] error: /Common/rule_abs_host_header_replace:2: error: [wrong # args][set HOST = [string tolower [HTTP::host]]]