Forum Discussion
Mar 11, 2015
Hi Amul, you want to test for the host-header to get it working:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "xyz.com"} {
HTTP::redirect "http://zyx.com"
} elseif {[string tolower [HTTP::host]] equals "www.xyz.com"} {
HTTP::redirect "http://zyx.com"
}
}
Second iRule:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "xyz.com"} {
HTTP::redirect http://zyx.com/
}
}
Thanks, Stephan
Edited: Add 2nd iRule upon specification