Forum Discussion
Need help with pool selection based on URI
That's very odd - when I pasted the rule in here it had *s in it - looking to match the phrase no matter what precedes or folows it - let me try again:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/accountsearchdev.somewhere.com/" { pool "/test-partition/accountsearchdev.somewhere.com-1080" } "/maintenancedev.somewhere.com/" { pool "/test-partition/maintenancedev.somewhere.com-1081" } "/passportnetdev.somewhere.com/" { pool "/test-partition/passportnetdev.somewhere.com-1082" log "Matched to passportnetdev.somewhere.com-1082"} "/agentsearchdev.somewhere.com/" { pool "/test-partition/agentsearchdev.somewhere.com-1083" } "/contracdev.somewhere.com/" { pool "/test-partition/contracdev.somewhere.com-1084" } "/mftransferdev.somewhere.com/" { pool "/test-partition/mftransferdev.somewhere.com-1085" } "/mfreportsdev.somewhere.com/" { pool "/test-partition/mfreportsdev.somewhere.com-1086" } "/esignaturereportsdev.somewhere.com/" { pool "/test-partition/esignaturereportsdev.somewhere.com-1087" } "/helpdeskdev.somewhere.com/" { pool "/test-partition/helpdeskdev.somewhere.com-1088" } "/batchimportmgrdev.somewhere.com/" { pool "/test-partition/batchimportmgrdev.somewhere.com-1089" } "/iprmdev.somewhere.com/" { pool "/test-partition/iprmdev.somewhere.com-1090" } "/passportadmindev.somewhere.com/" { pool "/test-partition/passportadmindev.somewhere.com-1091" } "/prevailintegrationdev.somewhere.com/" { pool "/test-partition/prevailintegrationdev.somewhere.com-1092" } "/qivadmindev.somewhere.com/" { pool "/test-partition/qivadmindev.somewhere.com-1093" } "/qivconfigdev.somewhere.com/" { pool "/test-partition/qivconfigdev.somewhere.com-1094" } "/quotetracdev.somewhere.com/" { pool "/test-partition/quotetracdev.somewhere.com-1095" } "/stratreportdev.somewhere.com/" { pool "/test-partition/stratreportdev.somewhere.com-1096" } default { log "Request: [HTTP::uri] from [IP::client_addr] failed - no match in list" }}}
- Oct 05, 2015Please use the preformatted code option in the forum. The rule is unreadable and I don't really feel like formatting it again for you. :)
- TLBrown_220661Oct 05, 2015
Nimbostratus
I'd love to, if I can figure out how.
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