The redirect portion looks correct, but the if statement looks off: if { [HTTP::host] contains “xyz.com” or [HTTP::host] contains “10.x.x.x” or [HTTP::host] contains “1x.x.x.x” }
Is a subsequent redirect coming from the server? I use this syntax often in iRules and have no issues (see the _sys_https_redirect iRule for an example of an f5-supplied iRule using the syntax). Have you tried testing from curl or another client that will show you exactly what is coming back from the F5?