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 } }
NAG
Cirrostratus
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
}
}
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