Forum Discussion
Dave_22402
Nimbostratus
Apr 19, 2010Irule switch - comment
How does one put comments into a Irule. This is on V10.
Here is an example of what I want to do - but the iRule Editor says the syntax is wrong:
when HTTP_REQUEST {
log local0. "[IP::client_addr]i IP recieved"
switch [IP::client_addr] {
"123.123.123.123" {
comment on where ip is
switch -glob [string tolower [HTTP::uri]] {
"/URL/*" { pool TEST_POOL}
"*" { pool PROD_POOL}
}
}
default {
switch -glob [string tolower [HTTP::uri]] {
"/URL/*" { HTTP::respond 301 Location }
"*" { pool PROD_POOL}
}
}
}
}
3 Replies
Sort By
- hoolio
Cirrostratus
Hi Dave, - Dave_22402
Nimbostratus
Aaron - hoolio
Cirrostratus
Hi Dave,when HTTP_REQUEST { log local0. "[IP::client_addr] IP recieved" if {[IP::addr [IP::client_addr] equals 123.123.123.123]}{ comment on where ip is switch -glob [string tolower [HTTP::uri]] { "/URL/*" { pool TEST_POOL} default { pool PROD_POOL} } } else { switch -glob [string tolower [HTTP::uri]] { "/URL/*" { HTTP::respond 301 Location https://some.location } default { pool PROD_POOL} } } }
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