Can someone tell me if this irule will work on the newer BigIP -migrating to version 9.1 from 4.6.4 and will it break anything?
here’s the rule :
if (http_host contains “www.dzi.dhl.com” and http_uri contains “client”) {
redirect to “https://interactive1.dhl.com/client/index.jsp”
}
else if (http_host == “www.dzi.dhl.com”) {
redirect to “https://interactive1.dhl.com/dzi/controller/login”
}
else if (http_host == “www.dzi.danzas.com”) {
redirect to “https://interactive1.dhl.com/dzi/controller/login”
}
else {
discard
}
First of all, I moved this from the iControl to iRules forum (in case you were wondering).
This rule won’t work as-is but will with some slight modificatons. You’ll need to change the 4.x variables to their 9.x counterparts and change the parens in your if’s to curly braces.
when HTTP_REQUEST {
if { ([HTTP::host] contains "www.dzi.dhl.com") and
([HTTP::uri] contains "client") } {
HTTP::redirect "https://interactive1.dhl.com/client/index.jsp"
} elseif { [HTTP::host] eq "www.dzi.dhl.com" } {
HTTP::redirect "https://interactive1.dhl.com/dzi/controller/login"
} elseif { [HTTP::host] eq "www.dzi.danzas.com" } {
HTTP::redirect "https://interactive1.dhl.com/dzi/controller/login"
} else {
discard
}
}
-Joe
Joe, thanks for moving this from icontrol, I just got the chance to check on this. Thanks for making the mods on this code.