Syntax Required -I Rule
Hi,
I have the below Exisiting Irule which is working fine.
switch -glob $HOST { "abc.com" { if { [class match $SRC equals WHITELIST-IPs] } { return } if { [class match $SRC equals Tool_star_IPs] } { return }
else { drop }
}
} }
I want to indroduce one more condition with below
If {[string tolower [HTTP::header "User-Agent"]] contains "mozilla" } { return }
I ended up with something like below,
switch -glob $HOST { "abc.com" { if { [class match $SRC equals WHITELIST-IPs] } { return } if { [class match $SRC equals Tool_star_IPs] } { return } If {[string tolower [HTTP::header "User-Agent"]] contains "mozilla" } { return }
else { drop }
}
} }
Which is not working, Infact throwing Syntax err. Kindly help me to add this.
Thanks Sachin M