Forum Discussion
Ron_130795
Nimbostratus
Jul 15, 2014Irule help with creating a single VIP but with multiple pools
I have a website called 'bigip.com', however, I also have a website call 'bigip.com/blog' and 'bigip.com/application' using the same VIP. Each url needs to point to a different pools. How can I wri...
Steve_M__153836
Nimbostratus
Jul 15, 2014Here is a tutorial: iRules 101 - Selecting pools, nodes
This should work for you. Your port number is controlled in the pool itself so there is no need to specify that in any way. Also depending on the use case you may want to use "contains" or "starts_with" instead of "eq" in the second and third condition of this iRule.
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
pool bigip
} elseif { [string tolower [HTTP::uri]] eq "/blog" } {
pool bigip2
} elseif { [string tolower [HTTP::uri]] eq "/application" } {
pool bigip3
}
If no pool is configured in the virtual as a default/fallback
default { pool bigip }
}
Ron_130795
Nimbostratus
Jul 15, 2014Thanks Steve. I appreciate your help.
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