Forum Discussion
raj_77723
Nimbostratus
Feb 14, 2016Custom iRule for URL rewrite for specific pool members
Requirement is
Virtual mapped with pool of 10 App servers. out of 10, 7 servers running with old version and 3 servers with new version. but the URL differs with server version. client will be ...
Kai_Wilke
MVP
Feb 15, 2016Hi Raj,
The additional pool is just used as a container to make the administration easier. But you could also hardcode the new nodes into the iRule using this syntax...
when RULE_INIT {
set static::new_app_nodes "1.1.1.1 443 2.2.2.2 443 3.3.3.3 443"
}
when HTTP_REQUEST_SEND {
if { $static::new_app_nodes contains "[LB::server addr] [LB::server port]" } then {
log -noname local0.debug "Match! [members -list $static::new_app_pool] contains [LB::server addr] [LB::server port]"
clientside {
Rewrite the request as needed...
}
} else {
log -noname local0.debug "Don't match! [members -list $static::new_app_pool] contains [LB::server addr] [LB::server port]"
}
}
Note: Include possible route domain suffixes as needed^^
Cheers, Kai
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