Forum Discussion
rondarf_352755
Oct 19, 2018Nimbostratus
too many redirects
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 "; } }
- Lee_SutcliffeNacreous
Firstly, your syntax isn't correct
should behttp_host
. Secondly you do not need a semicolon after the redirect.[HTTP::host]
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/" } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects