Forum Discussion

f51's avatar
f51
Icon for Cirrostratus rankCirrostratus
Jun 12, 2017

Route the traffic to specific context path on back end server

Hi,

 

VIP on 443. Servers on 7443 and 6443. Monitor tcp for servers.

 

I need like when user request for https://..com//home/ they need to connect 7443 https://..com//rest connect to 6443

 

How to add that context and how can we make it ?

 

Thanks in advance.

 

4 Replies

  • Hi,

     

    Lets say that in this example, your servers are located on two different pools; pool_6443 and pool_7443.

     

    You can attach the following iRule to the VIP and it will do the job, although the code is a bit crude:

     

    when HTTP_REQUEST {
        if { [string tolower [HTTP::path]] eq "/home" } {
            pool pool_7443
        }
        else { [string tolower [HTTP::path]] eq "/rest" } {
            pool pool_6443
        } 
    }
    • f51's avatar
      f51
      Icon for Cirrostratus rankCirrostratus

      Thank you Morten Marstrander. It is working now.

       

  • Hi,

     

    Lets say that in this example, your servers are located on two different pools; pool_6443 and pool_7443.

     

    You can attach the following iRule to the VIP and it will do the job, although the code is a bit crude:

     

    when HTTP_REQUEST {
        if { [string tolower [HTTP::path]] eq "/home" } {
            pool pool_7443
        }
        else { [string tolower [HTTP::path]] eq "/rest" } {
            pool pool_6443
        } 
    }
    • f51's avatar
      f51
      Icon for Cirrostratus rankCirrostratus

      Thank you Morten Marstrander. It is working now.