19-Oct-2018 14:36
have the iRule below and the page is coming back with too many redirects - I'm new to iRules - is this iRule creating a loop?
when HTTP_REQUEST { if {[http_host] equals "electronica2018.avnet.com"} { HTTP::redirect "; } }
20-Oct-2018
00:34
- last edited on
05-Jun-2023
11:42
by
JimmyPackets
Firstly, your syntax isn't correct
http_host
should be [HTTP::host]
. Secondly you do not need a semicolon after the redirect.
That said - you are issuing a redirect to a Host, based on the condition that the request matches the same Host header - therefore creating a loop.
If you just want to amend the URI you can use the following iRule. Alternatively, this can be achieved using a Local Traffic Profile.
when HTTP_REQUEST {
if {[HTTP::host] equals "electronica2018.avnet.com"} {
HTTP::uri "/wps/portal/e2018/"
}
}