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...
Gregt_33960
Nimbostratus
Jun 12, 2008Did not work as planned
Status update.. the code almost worked... I can not get this to work for these root URLs
http://test.domain.com or http://test.domain.com/
everytime I enter this in my browser I get page not found but all the other filters work.. For example
http://test.domain.com/train works great.
My objective is that the base URL should default to a pool and append the pgLogin.jsp string. and be redirected to that page.
I tried adding another switch statement to see what happens but no luck
Below is my code
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]:[HTTP::uri]"
first set the pool for any URI containing one of the subdirs
switch -glob [HTTP::uri] {
"*/sandbox*" { pool state_sandbox_pool }
"*/pilot*" { pool state_pilot_pool }
"*/whatif*" { pool state_whatif_pool }
"*/intgtst*" { pool state_int_pool }
"*/uatpr*" { pool state_uatpr_pool }
"*/uat*" { pool state_uat_pool }
"*/train*" { pool state_train_pool }
"*/*" { pool state_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 '/" needs to be included
switch -glob [HTTP::uri] {
"*/sandbox/" -
"*/pilot/" -
"*/whatif/" -
"*/intgtst/" -
"*/uatpr/" -
"*/uat/" -
"*/train/" -
"*/sandbox" -
"*/pilot" -
"*/whatif" -
"*/intgtst" -
"*/uatpr" -
"*/uat" -
"*/train" { HTTP::uri "[HTTP::uri]/jsp/common/pgLogin.jsp" }
}
}
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
