Forum Discussion
Brad_Parker_139
Sep 01, 2015Nacreous
Try this, it will check to see if you have a pool created that matches the http hostname_pool and if not go to your default pool. If it does it will go to the corresponding pool.
when HTTP_REQUEST {
if { [getfield [HTTP::host] "." 1] ends_with "tr"}{
if { [catch {pool [string tolower "[HTTP::host]_pool"]}] }{
pool "default_pool"
}
else {
pool [string tolower "[HTTP::host]_pool"]
}
}
}
Updated.
- Brad_Parker_139Sep 01, 2015Nacreousprobably throw a string to lower in there in case someone requests with caps, when HTTP_REQUEST { if { [catch {pool [string tolower "[HTTP::host]_pool"]}] }{ pool "default_pool" } else { pool [string tolower "[HTTP::host]_pool"] } }
- Brad_Parker_139Sep 01, 2015NacreousThis will not satisfy the problem posed.