Forum Discussion
ryank5589
Feb 18, 2020Nimbostratus
iRule assistance based on URI and source address
Hey all! I have an application that currently allows for all users to connect to a java and non java version based on the URI that you browse to. I would like to allow only a specific range o...
- Feb 19, 2020
Following iRule code should remove the redirect loop to the nonjava version.
when HTTP_REQUEST { if { ([HTTP::uri] contains "/java/version") && ([class match [IP::client_addr] equals JAVA-VERSION-NETS]) } { pool My-Web-Pool } else { if { [HTTP::uri] contains "/java/version" } { HTTP::redirect https://application.com/nonjava/version } pool My-Web-Pool } }
ryank5589
Feb 19, 2020Nimbostratus
Samir,
Thanks for the response! I don't understand how the irule you provided distinguishes between the java and nonjava version for the initial traffic. For example, both the java and non java versions are hosted on the same pool members within the same pool, but the only difference is the uri. Any idea how to write an irule for that?
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