Forum Discussion
Mike_Perez_6161
Feb 18, 2010Nimbostratus
Aaron,
Thanks a bunch for the idea here. It really got my wheels spinning. Got it to work with lowercase only at first. So basically repeated it with uppercase a the first letter to parse. Also the issue with it character ranging within the string was a huge road block. Was addressed by creating another query by going to the next character and still pointing it to the correct pool. A little more work but gets the job done. Aaron thanks again.
example will explain what I am talking about above.
when HTTP_REQUEST {
Parse the first then second character in the path
switch -glob [HTTP::path] {
"/a[a-lA-L]*" {
pool reward-uat5.123.com_AA2AL
}
"/A[a-lA-L]*" {
pool reward-uat5.123.com_AA2AL
}
"/a[m-zM-Z]*" {
pool reward-uat5.123.com_AM2BL
}
"/A[m-zM-Z]*" {
pool reward-uat5.123.com_AM2BL
}
"/b[a-lA-L]*" {
pool reward-uat5.123.com_AM2BL
}
"/B[a-lA-L]*" {
pool reward-uat5.123.com_AM2BL
}
"/b[m-zM-Z]*" {
pool reward-uat5.123.com_BM2CD
}
"/B[m-zM-Z]*" {
pool reward-uat5.123.com_BM2CD
}
"/c[a-dA-D]*" {
pool reward-uat5.123.com_BM2CD
}
"/C[a-dA-D]*" {
pool reward-uat5.123.com_BM2CD
}
default {
Requested URI was a leading forward slash only
pool reward-uat5.123.com_AA2AL
}
}
}