Forum Discussion
youssef1
Sep 25, 2018Cumulonimbus
Hi,
you can use this irule without redirect but just rewrite host header:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"abc.com" {
pool "www.abc.com"
HTTP::header replace Host "www.abc.com"
}
"abc.com" {
pool "www.mno.com"
HTTP::header replace Host "www.mno.com"
}
"xyz.com" {
pool "www.xyz.com"
HTTP::header replace Host "www.xyz.com"
}
default {
do nothing
}
}
}
if you want use redirect just replace:
HTTP::header replace Host "www.abc.com"
by
HTTP::redirect "https://www.abc.com[HTTP::uri]"
regards,