Forum Discussion
Parveez_70209
Nimbostratus
Dec 12, 2013How to Switch Between Pools using Irule
Original Irule:
==============================
when HTTP_REQUEST {
set http_uri [string tolower [HTTP::uri]]
if {$http_uri equals "/" } {
...
Kevin_Stewart
Employee
Dec 12, 2013Philou, I think your second condition may cause an infinite loop. If URI equals /floorplan, go to /floorplan. This issue, Parveez, is a matter of state. As Philou alludes, when a client makes a request (ingress) and the iRule responds with a redirect (egress), there is no further ingress and no traffic will get sent to a pool. Something like this may work instead:
when HTTP_REQUEST {
set http_uri [string tolower [HTTP::uri]
if { $http_uri equals "/" } {
HTTP::redirect "https://kepogstest.jdadelivers.com/ikb"
} elseif { $http_uri starts_with "/ikb" } {
pool kepogstest.example.com-POOL
}
}
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