Forum Discussion
Jim_Bo
Apr 17, 2014Nimbostratus
Thank you for your response. Your code did what I asked but unfortunately my logic was faulty. After testing, we discovered that if a user needed to access the information in more than one of the pools, the BigIP cookies from previous queries would direct queries to incorrect pools. So it appears that I need to remove the pool name strings from the URIs or PATHs during HTTP requests and add them back in during HTTP responses based upon the pool which processed the request. I am not sure how to accomplish this request.
when HTTP_REQUEST
switch -glob [string tolower [HTTP::path]] {
"/pool_a*" {
set lbpath HTTP::path
HTTP::path "/"
pool "pool_a" }
"/pool_b*" {
set lbpath HTTP::path
HTTP::path "/"
pool "pool_b" }
"/pool_c*" {
set lbpath HTTP::path
HTTP::path "/"
pool "pool_c" }
"/pool_d*" {
set lbpath HTTP::path
HTTP::path "/"
pool "pool_d" }
default { reject }
}
when HTTP_RESPONSE
switch -glob [string tolower $lbpath ] {
"/pool_a*" {
HTTP::path "/pool_a/[HTTP::path]" }
"/pool_b*" {
HTTP::path "/pool_b/[HTTP::path]" }
"/pool_c*" {
HTTP::path "/pool_c/[HTTP::path]" }
"/pool_d*" {
HTTP::path "/pool_d/[HTTP::path]" }
default { reject }
}