Forum Discussion
help with irule else test-pool not getting hits
When typing only https://test.swbc.com in my browser I am not hitting my last resort pool Test-SWBC-Migration2
I do get out current home page but not the new website on pool Test-SWBC-Migration2. Please check why my else pool Test-SWBC-Migration2 my not be showing.
Also, how can I add a logging statements to the irule that will show me the pool im hitting and the command to view in the ssh shell.
----------------------------------------
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]]) contains "test.swbc.com" } {
switch -glob -- [string tolower [HTTP::uri]] {
"*paymentprocessorv3*" -
"*paymentprocessorakc*"
{
pool IIS_ECM.SWBC.com_pool
}
"/holtcat" {
HTTP::redirect "https://focusnet.swbc.com/fnFProvider/fnFProvider.asp? app=HCEnrollmentTool&wanted=BECONFIRM&BenefitYear=2011&BenefitType=N"
}
"*/akcelerant*" -
"*/idsakcelerant*" -
"*/idsakcelerantmtg*" -
"*/lmakcelerant*" {
pool IIS_SWBC.com_pool
}
else {
pool Test-SWBC-Migration2
}
}
}
}
2 Replies
The else statement in your iRule is being used as a case in the switch.
If you want to use an "else" type case for a switch, use the keyword "default" instead of "else" (see the default wiki topic: https://devcentral.f5.com/wiki/irules.switch.ashx).
If you want it to be an else for the first "if" statement, move it out of the switch.
Hope this helps...
- Gill_32697
Nimbostratus
yes, i see what you mean. I will work with that. Thank you ..Joe.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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