OK great.So, I think all you'll want to do is remove the pool commands from the CLIENT_ACCEPTED event and then lookup the requested hostname in the HTTP_REQUEST even and specify the pools there. Something like this;
when CLIENT_ACCEPTED {
switch [TCP::local_port] {
80 { SSL::disable clientside
SSL::disable serverside
return
}
443 {
return
}
default {
reject
}
}
}
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"www.test.com" -
"www.example.com" { pool number1 }
"www.something.com" { pool number2 }
"www.testing.com" { pool number3 }
If HTTP host is none of the above, take the default action below
default {
reject }
}
}