Forum Discussion
IheartF5_45022
Apr 02, 2014Nacreous
Just one approach - I'd create 3 pools;-
pl_xyz_http members {2.2.2.2:80 2.2.2.3:80}
pl_def_http members {2.2.2.3:80 2.2.2.4:80}
pl_ghi_http members {2.2.2.4:80}
Then on your VIP apply round-robin and oneconnect profile and the following iRule;-
when HTTP_REQUEST {
set path_seg1 [lindex [split [HTTP::path] / ] 1 ]
switch $path_seg1 {
"xyz" -
"abc" -
"ghi" {
Rewrite Host header
HTTP::header replace Host "${path_seg1}.com"
Rewrite path
HTTP::path "/"
pool "pl_{$path_seg1}_http"
}
default {
Will be sent to default pool attached to virtual
}
}
}
There are obviously many ways to approach this though