Forum Discussion
VernonWells
Jul 06, 2016Employee
Assuming that you've solved the DNS part, and the fully-qualified domain names are really oli2 and oli2.bcbsnj.com, then, via an iRule:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "oli2" } {
HTTP::respond 301 Location "http://oli2.bcbsnj.com"
}
}
If you only wish to redirect when the request is specifically for "/":
when HTTP_REQUEST {
if { [HTTP::path] eq "/" and [string tolower [HTTP::host]] eq "oli2" } {
HTTP::respond 301 Location "http://oli2.bcbsnj.com/"
}
}
If you are using 11.4 or higher, you may also use a Local Traffic Policy: