Forum Discussion
laowu_53451
Nimbostratus
Sep 02, 2009URL select sample
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/SSO" } {
pool sso_server
} elseif { [HTTP::uri] starts_with "/SysManage" } {
pool sysmanage_server
...
Sep 02, 2009
Is this a question or are you just sharing a solution you came up with? My only comment is that since you are using the same comparison (ie. HTTP::uri) then you can optimize this iRule by converting it to a switch statement.
when HTTP_REQUEST {\
switch -glob [HTTP::uri] {
"/SSO*" {
pool sso_server
}
"/SysManage*" {
pool sysmanage_server
}
"/CustManageWeb*" {
pool custmanageweb_server
}
"/MrmWeb*" {
pool mrmweb_server
}
"/CrmWeb*" {
pool crmweb_server
}
"/BillWeb*" {
pool billweb_server
}
"/CspWeb*" {
pool cspweb_server
}
"/CrdWeb*" {
pool crdweb_server
}
"/IntWeb*" {
pool intweb_server
}
}
}
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
