Forum Discussion

Mario_Velazque1's avatar
Mario_Velazque1
Icon for Nimbostratus rankNimbostratus
Aug 12, 2014

Http to Http Uri forward

Hi

 

i have a question regarding uri forwarding, i have following scenario, F5 LTM balancing 2 web servers (W1 and W2)using oracle web logic, each server has several applications running.

 

user request : http://app1.example.com/APP1 this should be load balanced to W1:7010 and W2:7020 but the request should contain /APP1.

 

i was unable to configure this any help is greatly appreciated

 

Thanks

 

2 Replies

  • Hi Mario, You could attach an iRule like this to your virtual server. That way all URIs starting /app1/ upper or lower case will go to your app1-pool and so on.

     

    when HTTP_REQUEST { set uri [strng tolower [HTTP::uri]] switch -glob $uri { "/app1/" {

     

    pool app1-pool } "/app2/" { pool app2-pool } } }

     

  • A http redirect sent to the client when http://app1.example.com/ is accessed should do the trick.

    when HTTP_REQUEST { if { [HTTP::uri] equals "/" and [string tolower [HTTP::host]] equals "app1.example.com"} { HTTP::redirect "http://[HTTP::host]/APP1" } }