Forum Discussion
Tony2020
Nimbostratus
Aug 30, 2018Redirect to pool based on URI not working
Hi All,
I am having issues with a redirect within an Irule.
Here is what I am trying to do.
If users coming from the internet (not matching datagroup 10.0.0.0/8) and they go to
"/test" ...
iaine
Nacreous
Aug 30, 2018Hi
I think you need to re-order your logic slightly so that the redirect only happens if all other logic doesn't fire. Try something like this
when HTTP_REQUEST {
if {([class match [IP::client_addr] equals DG-INTERNAL-IP])} {
pool TESTPOOL_443
} elseif {
[string tolower [HTTP::uri]] eq "/test"} {
pool TESTPOOL_443
} else {
HTTP::redirect "http://maintenance.test.com"
}
}
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