Yes you can with an iRule, in the iRule you need to use the virtual Command however this has an issue. When you use virtual you can’t check the status of the virtual server you are forwarding to before so it is a blind forward unless you know and check the associated pools.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with “/vs2”} {
Send request to a new virtual server
virtual vs2
}
}
A better approach might be to forward to different pools instead of different virtual servers.
The only two reasons I have used virtual is for Data Centre Affinity and automatically selecting virtual for different SSL profiles.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with “/vs2”} {
Send request to a new virtual server
pool vs2_pool
}
}