Forum Discussion
afara2000_1973
Nimbostratus
Feb 13, 2010redirect to two pools with diff ports
I'm pretty new to irule. I'm trying to access two different web instances using URIs. Requirement is to use single VIP. e.g.,
http://www.mycompany.com/ ;goes to pool1:port1
htt...
afara2000_1973
Nimbostratus
Feb 15, 2010Thanks Bhattman for your code but that didn't take care of /app2 in uri. I decided to use /app2/* for all web application 2 paths. Therefore, I modified your code and this seems to be working fine:
when HTTP_REQUEST {
-glob: allow string pattern matching to check within requested path
switch -glob [string tolower [HTTP::path]] {
"/app2" {
log local0. "Exact macth for /app2 - sending to pool_2 in [HTTP::uri]"
HTTP::uri [HTTP::uri]/
pool Pool_2
}
"/app2/*" {
log local0. "Matched /app2/* - No rewrite, sending to pool_2 for [HTTP::uri]"
pool Pool_2
}
default {
log local0. "No match for app2, sending to default pool_1 for [HTTP::uri]"
pool Pool_1
}
}
}
My next step is to expand this code to use https instead of http. Can this code still be used? I will be planning to terminate SSL using clientside and serverside SSL certs. Any hint or help would be highly appreciated. Thanks,
Al
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