Forum Discussion
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
- Stanislas_Piro2
Cumulonimbus
Which behavior do you expect?
Mozilla keyword is included in any browser user-agent string
Can you post your code here with formatting feature?
It can help to understand the code and find the issue!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com