Forum Discussion
Hannes_Rapp
Apr 21, 2015Nimbostratus
I'm assuming the "if request comes from" actually means the client is requesting the Host specified? Depending on how your DNS resolves and how you've configured your Virtual Server TCP listeners, the iRule below should do the job.
when HTTP_REQUEST {
if { [HTTP::host] == "abc.com" }{
HTTP::respond 302 location "https://abc.com"
event disable
TCP::close
} elseif { [HTTP::host] == "osabc.com" }{
HTTP::respond 302 location "http://abc.com"
event disable
TCP::close
} else {
Do nothing; the request will be routed to a back-end server as defined in default pool applied to a VS.
}
}