Forum Discussion
New addition to the 'switch -glob' isn't taking effect - please help
Other services in the iRule seem to be working, but when we add a new entry, it doesn't seem to be sending traffic to the same pool as others are using... for example...
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/drsservice/" { pool UAT_RC_DRS_Web } "/eventservice/" { pool UAT_RC_DRS_Web } "/addressservice/*" { pool UAT_RC_DRS_Web } "/AuthenticationService/" { pool UAT_RC_DRS_Web } "/AuthService/" { pool UAT_RC_DRS_Web } <<<< THIS NEW AuthService ENTRY IS NOT WORKING, ALL OTHERS ARE WORKING } }
1 Reply
- hoolio
Cirrostratus
Hi Brian,
Changes to an existing iRule will only take effect for new connections. Existing connections will use the original version of the iRule.
That said, the issue I see with your iRule is you're setting the URI to lower case to check it, but using mixed case switch cases.
Try setting AuthenticationService to authenticationservice and AuthService to authservice.
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/drsservice/" - "/eventservice/" - "/addressservice/*" - "/authenticationservice/" - "/authservice/" { pool UAT_RC_DRS_Web } } }Aaron
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