Forum Discussion

Jay_PL's avatar
Jay_PL
Icon for Nimbostratus rankNimbostratus
Mar 27, 2019

need irule for re-direction based on URL and port

Need help on the irule for the below scenario.

 

when user hits, abc.broadcom.com --> redirect to https://abc.broadcom.com/login ----> This is working for me When user hits, abc.broadcom.com:8080 --> redirect to https://abc.broadcom.com:8080/login ---> Need to have both the above in the same iRule.

 

I have a VS available for both the redirect URLs and one port 80 VS for abc.broadcom.com. Any possible solutions available?

 

1 Reply

  • Are you sure you mean redirect? Redirecting to the same host will cause a redirect loop. I think you just mean URI rewrite, which can be done with a very simple iRule or using a Local Traffic Policy

    when HTTP_REQUEST {
        if {[HTTP::uri] equals "/"} {
            HTTP::uri "/login"
        }
    }