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...
The_Bhattman
Nimbostratus
Jun 11, 2008HI Greg,
I think the problem is that it's matching the UAT IF stagement first. You are using "starts_with" which means uatpr actually starts with "uat" in the string. Perhaps you might want to change the order of evaluation. Instead of evaluating UAT before UATPR, try evaluating UATPR first and then UAT.
Another thing I noticed was the multiple IF-ELSE statements to define your logic. You might want to change that over to using a "switch" statement only to cut down on the IF-ELSEIF and avoided the nested IF statements.
I.E.
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/train*" { pool train_pool }
"*/train" { HTTP::uri "/train/jsp/common/pgLogin.jsp" }
"/uatpr*" {pool uatpr_pool}
"*/uatpr" { HTTP::uri "/uatpr/jsp/common/pgLogin.jsp" }
"/uat*" {pool uat_pool}
"*/uat" { HTTP::uri "/uat/jsp/common/pgLogin.jsp" }
default { pool uat_pool}
}
}
Click here for more info about using switch
Hope this helps.
CB
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
