Forum Discussion
jaikumar_f5
Aug 28, 2018MVP
Hi Tyranon,
Try the below,
when HTTP_REQUEST {
if { [HTTP::host] equals "aaa.com" } {
HTTP::redirect "https://bbb.com[HTTP::uri]"
} elseif { [HTTP::host] equals "bbb.com" } {
pool bbb.com
}
}
BTW if your VS already has the default pool which is bbb.com, you dont need the elseif condition, because the host is ultimately going to be bbb.com and it would just process the traffic and send to the VS pool, so below irule can be used too,
when HTTP_REQUEST {
if { [HTTP::host] equals "aaa.com" } {
HTTP::redirect "https://bbb.com[HTTP::uri]"
}
}