Forum Discussion
pchace
Nimbostratus
Aug 09, 2019Trying 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 ...
The_Bhattman
Nimbostratus
Jul 13, 2009On the Virtual server x.x.x.42:22 do you have SNAT: Automap setting turned on?
CB
Thanks Vijay,
Let me know if I did something wrong, but I entered the rule like this:
when HTTP_REQUEST {
HOST = [string tolower [HTTP::host]]
if { (not ($HOST eq "abc.host.com")) or
(not ($HOST eq "xyz.host.com")) } {
HTTP::header replace Host "abc.host.com"
}
}
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]]]