Forum Discussion

priort_73475's avatar
priort_73475
Icon for Nimbostratus rankNimbostratus
Sep 26, 2007

F5 redirects everything to root and will not let you go to Virtual Directory

I need help writing a rule Please

 

 

Right now I have a Virutal Server (155.125.0.120)

 

 

It load balances 10 Web server

 

150.120.10.45 - 55

 

 

We have a DNS name of "Bingo" which points to 155.125.0.120

 

That works perfectly.

 

 

Now our Web developer has added an other Web site in a virtual directory called "Winner" to those servers and wants to be able to type "Bingo/Winner" and go to the winner web site.

 

 

If I type in an IP address of the Web server 150.120.10.45/winner I get to the "winner" web site.

 

 

But if I type "Bingo/Winner" or 155.125.0.120/winner F5 seems to keep redirecting everything to the root and will not let you go to the virtual directory.

 

 

I have one rule in place right now --

 

 

when HTTP_REQUEST {

 

 

HTTP::redirect "https://155.125.0.120"

 

 

}

 

 

 

 

 

Any help will be appreciated.

 

 

thank you,

 

Tracy Prior
  • Well, your redirect is stripping the query parameters off of the URL. I believe the HTTP_REQUEST event will trigger regardless of if it's using HTTP or HTTPS (at least if the BIG-IP is terminating SSL. I could be wrong here.), so you're basically always redirecting the user to the root.

    Try this:

    
    when HTTP_REQUEST {
      HTTP::redirect "https://[HTTP::host][HTTP::uri]"
    }

    You'll probably want to add a condition in there that prevents the redirect if the request is already using HTTPS.