Forum Discussion

Pramod_PJ__2826's avatar
Pramod_PJ__2826
Icon for Nimbostratus rankNimbostratus
Aug 04, 2016

Url Rewrite (Loadbalancer)

Hi All, We have a F5 load balancer and 2 application server. request to those servers are being sent on the Round Robin basic. Currently users are requesting it by [https:\comp.abc.com\login\login.aspx] and the same request is being redirected to application servers which is working fine. Now our customer doesnt want to write the complete url and instead he just want to write [[https:\comp.abc.com] to get the login page. Can someone help me to achieve this.

 

Regards -PJ-

 

  • Hi Pramod,

    Try below irule..

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

    -Jinshu

  • Snl's avatar
    Snl
    Icon for Cirrostratus rankCirrostratus

    try this modify the pool name as per your requirement

        when HTTP_REQUEST { 
        if { [string tolower [HTTP::host]] equals "comp.abc.com" } { 
         if { [HTTP::uri] equals "/" } {        
             HTTP::redirect "https://[HTTP::host]/login/login.aspx"
                 }
            pool ABC POOL
                }
                }