Forum Discussion
TJ_Vreugdenhil
Cirrus
Jan 21, 2015Expected boolean value error - iRule 11.4.1
Any help with the brackets placement?
when RULE_INIT {
v1.0 - ACL to block /jadu from outside networks
January, 2015
}
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/jadu" && ! [class match [IP::client_addr] equals forward-slash-jadu-allow-networks] } {
log local0. "Invalid client IP & URI: [IP::client_addr] - discarding"
HTTP::redirect "http://site.com/site/custom_scripts/unauthorized.php"
}
}
ltm data-group internal forward-slash-jadu-allow-networks {
records {
10.20.1.0/24 { }
10.60.0.0/16 { }
}
type ip
}
Jan 21 10:59:58 loadbalancer1 err tmm[8230]: 01220001:3: TCL error: /Common/forward-slash-jadu-allow-networks_iRule - expected boolean value but got " [string tolower [HTTP::uri]] starts_with "/jadu" " while executing "if { { [string tolower [HTTP::uri]] starts_with "/jadu" } && { ! [class match [IP::client_addr] equals forward-slash-jadu-allow-networks] } } { 1 Reply
- StephanManthey
Nacreous
Hi TJ,
some brackets will do the job:if { ([string tolower [HTTP::uri]] starts_with "/jadu") && ! ([class match [IP::client_addr] equals forward-slash-jadu-allow-networks]) }Thanks, Stephan
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects