Forum Discussion
Chris_Olson
Nimbostratus
Nov 10, 2006URI and pool redirection
Having trouble with the following iRule. Any help is appreciated.
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { $uri starts_with "/app1" } {
HTTP::uri [...
hoolio
Cirrostratus
Nov 10, 2006What trouble are you having? You can add some log statements to see which condition is being met and what change is being made to the URI:
log local0. "\$uri was $uri"
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { $uri starts_with "/app1" } {
log local0. "\$uri was $uri"
HTTP::uri [string map -nocase {"/app1" "/prod/login.cmdx"} $uri]
pool Prod_EE_11
}
elseif { $uri starts_with "/app2" } {
log local0. "\$uri was $uri"
HTTP::uri [string map -nocase {"/app2" "/prod/login.cmdx"} $uri]
pool Prod_EE_10
}
else {
log local0. "\$uri was $uri"
HTTP::uri [string map -nocase { * "/app1/login.cmdx"} $uri]
Pool Prod_EE_11
}
}
Aaron
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