Joe_5599_134300
Jan 23, 2014Nimbostratus
HTTSP Inbound Then Filter on /URI for Pool Selection iRule
when HTTP_REQUEST { Get client IP address set src_ip [IP::client_addr] set header value HTTP_VIA to the client IP address HTTP::header insert "VIA" $src_ip
route to pool based on URI value
switch -glob [string tolower [HTTP::uri]] {
"/appsite1*" {
pool app2.testone.test.com-8080
}
"/appsite2*" {
pool app2.testone.test.com-8081
}
"/appsite3*" {
pool app2.testone.test.com-8085
}
"/appsite4*" {
pool app2.testone.test.com-9080
}
default {
set http_reply "You have reached [HTTP::host], though the URL is incomplete or incorrect.
Please contact Customer Support at 800-xxx-xxxx if you continue to have trouble." HTTP::respond 200 content $http_reply } }