Forum Discussion
Yung_Liu_113940
Nimbostratus
Feb 01, 2006How to direct HTTP request to a particular pool member and keep the persistence (cookie insert mode)
Hi,
I am trying to use iRule to direct http request to a particular pool member if the URI contains ip=x.x.x.x where x.x.x.x is the ip of a pool member. One of the requirement is to keep th...
Yung_Liu_113940
Nimbostratus
Feb 06, 2006Colin,
I followed unRuley's instruction and modified the iRule (please see below) but I still don't see BigIP sending cookie when URI contain's ip=x.x.x.x. I tried this on both version 9.0 and 9.2 without much success. Any help on this is greatly appreciated.
Thanks,
when HTTP_REQUEST {
set uri [HTTP::uri]
if { $uri contains "ip=" } {
set uri_index [split [HTTP::uri] "/"]
set myserver [string trimleft [lindex $uri_index 1] "/"]
set myserverip [lindex [split $myserver "="] 1]
set newuri [join [lrange $uri_index 2 end]]
HTTP::uri "/$newuri"
pool testpool member $myserverip 80
}
else {
pool testpool
persist none
}
}
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