Forum Discussion

LucioCamilo_559's avatar
LucioCamilo_559
Icon for Nimbostratus rankNimbostratus
Apr 27, 2011

Redirect Big Ip to <servername>:port/name_app

I would like to redirect traffic through the bigip for a application that responds through the url:

 

 

machine35.company.com: 7784/app/application

 

 

Where the machine ip is 173.31.32.41

 

 

for example: I have a rule that checks if the uri starts with "/ app / application"

 

if start, then it redirects to the application pool that has a service member 173.31.32.41 and port 7784.

 

 

if I try to access the application by the big ip it does not find the page, but if I type machine35.company.com: 7784/app/application the application is accessed.

 

 

Currently I use Oracle WebCache to direct the name to the server that will respond, but I'm willing to take the webcache, and it must pass the rules for big ip

 

 

Could anyone help me?

2 Replies

  • Hi Lucio,

     

     

    You could use a switch statement to check the requested host header and/or URI and then select a pool that contains the server IP:port you want to receive the requests. As long as you leave (destination) port translation enabled on the virtual server, LTM will translate the client's destination port to the pool member's port.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/switch

     

     

    Aaron
  • I am trying this, but isnt working.

     

    look my rule:

     

     

    when HTTP_REQUEST {

     

    set uri_orig [HTTP::uri]

     

     

    if {($uri_orig starts_with "/app/enquete")}{

     

    log local0. "$uri_orig - pool enquete"

     

    pool enquete

     

    }

     

    else {

     

    log local0. "$uri_orig - pool outros"

     

    pool oracle_externo

     

    }

     

    }

     

     

    where the pool are my servers:port. But the pool isnt answering and I dont know why. I think is a problem of the Oracle, and I want to log to wich server it is redirecting. Do you know how can I do this?