Forum Discussion
Gregt_33960
Nimbostratus
Jun 11, 2008IRule send to wrong Pool and Port
Hello,
I am hoping this is going to be an easy fix. I have several web server instances over various ports on a web server and the IRule, using URI filters, was working fine, until I ne...
Deb_Allen_18
Jun 11, 2008Historic F5 Account
Good call on the switch case, CB. Doesn't look like you are making the pool selection in the case of the URI re-writing, is all - the switch is a case statement, and will drop out after executing the first match body.
Expanding on that idea a bit, and splitting up the 2 decisions that need to be made, I think this might be what you're after, Greg:
when HTTP_REQUEST {
first set the pool for any URI containing one of the subdirs
switch -glob [HTTP::uri] {
"*/train*" { pool train_pool }
"*/uatpr*" { pool uatpr_pool }
"*/uat*" { pool uat_pool }
}
now re-write the URI's when necessary
a "-" means to execute the same body as the next condition
The only diff betw the 2 strings is whether the leading '/" is needed
switch -glob [HTTP::uri] {
"*/train/" -
"*/uatpr/" -
"*/uat/" { HTTP::uri "[HTTP::uri]jsp/common/pgLogin.jsp" }
"*/uatpr" -
"*/train" -
"*/uat" { HTTP::uri "[HTTP::uri]/jsp/common/pgLogin.jsp" }
}
}
HTH
/deb
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
