For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

ryank5589's avatar
ryank5589
Icon for Nimbostratus rankNimbostratus
Feb 18, 2020
Solved

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...
  • NAG's avatar
    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
        }
    }