Forum Discussion
KJ_50941
Nimbostratus
Sep 21, 2015iRules when pool member is down
I used below irule so if both pool members failed then F5 iRule due redirect to another page which is hosting on another server.
when HTTP_REQUEST {
if { [active_members My_APACHE_SAT_8443_Pool ...
THi
Nimbostratus
Sep 21, 2015You have some syntax errors, for example else if should be written together "elseif" and also directly to the line of closing the main if branch. Try:
when HTTP_REQUEST {
if { [active_members My_APACHE_SAT_8443_Pool] < 1 } {
HTTP::redirect http://example-test.com/
} elseif { [HTTP::uri] eq "/" } {
HTTP::redirect https://[HTTP::host]/help/html
}
}
That passes syntax check on TMOS version 11.5.1 on my lab unit. You can refer to iRules Wiki
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