Forum Discussion
Eric_Frankenfie
Nimbostratus
Nov 07, 2016iRule vs. Local Traffic Policy vs. Rewrite Profile
Rewrite URI and send to specific pool/node.
I have a pool with 6 members which is applied to a virtual server. Our support team would like to have the ability to test against each of the 6 memb...
Eric_Frankenfie
Nimbostratus
Nov 07, 2016This is the iRule I created. Do you recommend using IF or CASE statements, or does it not matter?
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/n1" } {
HTTP::path "/myApp"
pool n1-app.example.com_443_pool
} elseif { [HTTP::uri] starts_with "/n2" } {
HTTP::path "/myApp"
pool n2-app.example.com_443_pool
} elseif { [HTTP::uri] starts_with "/n3" } {
HTTP::path "/myApp"
pool n3-app.example.com_443_pool
} elseif { [HTTP::uri] starts_with "/n4" } {
HTTP::path "/myApp"
pool n4-app.example.com_443_pool
} elseif { [HTTP::uri] starts_with "/n5" } {
HTTP::path "/myApp"
pool n5-app.example.com_443_pool
} elseif { [HTTP::uri] starts_with "/n6" } {
HTTP::path "/myApp"
pool n6-app.example.com_443_pool
} else {
pool app.example.com_443_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