log "Host is [HTTP::host], URI is [HTTP::uri]"
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/magallanes" } {
log "IF successful on URI [HTTP::uri]"
pool pool_magallanes
} elseif { [HTTP::uri] starts_with "/hansolo" } {
log "ELSEIF successful on URI [HTTP::uri]"
pool pool_hansolo
}
}
Yeah, my bad on that. The first log line should go immediately after the when HTTP_REQUEST, but before your if statement.
So the rule is doing what it should based on your log information, so the question is, does /magallanes exist on the 150.200.200.4 server, or should the URI be stripped off?
There isn’t a problem with the rule or the vip that I can see, check your 10.200.200.4 server to see if /magallanes is a valid directory in your httpd.conf file. I’m guessing you really want to strip the URI once it has been used to determine the server. Try this:
when HTTP_REQUEST {
log "Host is [HTTP::host], URI is [HTTP::uri]"
if { [HTTP::uri] starts_with "/magallanes" } {
log "IF successful on URI [HTTP::uri]"
HTTP::uri "/"
pool pool_magallanes
} elseif { [HTTP::uri] starts_with "/hansolo" } {
log "ELSEIF successful on URI [HTTP::uri]"
HTTP::uri "/"
pool pool_hansolo
}
}