Forum Discussion
Brad_Parker
Feb 25, 2015Cirrus
Well if you are going to have pool selection based on hostname and URI you will have to combine them or else they could conflict and not process they way you want. You could do someting like this which will prioritize the pool selection on the URI first then select to pool based on hostname if the URI doesn't match. Before throwing it in production I would try it in a non-prod first if at all possible.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/specific_directory" } {
pool
}
else {
switch [string tolower [HTTP::host]] {
www.domain.com { pool }
secure.domain.com { pool }
}
}
}