Forum Discussion
laowu_53451
Nimbostratus
16 years agoURL select sample
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/SSO" } {
pool sso_server
} elseif { [HTTP::uri] starts_with "/SysManage" } {
pool sysmanage_server
...
16 years ago
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