Forum Discussion
Andy_McGrath
Apr 16, 2019Cumulonimbus
Regarding you second part if using an iRule you could do something like the following to update the host name:
when HTTP_REQUEST {
if {!([HTTP::host] starts_with "example.com") and !([HTTP::host] starts_with "test.com")} {
HTTP::redirect "https://[join [lreplace [split [getfield [HTTP::host] : 1] "."] 0 0] "."][HTTP::uri]"
}
}
This will only work on a HTTP connection, on HTTPS the client would still get an error before the redirect occurs.