Forum Discussion

Srini_87152's avatar
Srini_87152
Icon for Cirrostratus rankCirrostratus
Nov 26, 2014

Route the traffic to specific context path on back end server

Hi All,

 

There is request to route traffic specific context path on server side..like example below.

 

http://abc.com/ --> NodeA:8080/origin.tool

 

Im not sure if this possible with any iRule?please help me out if any one aware the rule.

 

1 Reply

  • R_Marc's avatar
    R_Marc
    Icon for Nimbostratus rankNimbostratus

    Yes.

    when HTTP_REQUEST {
        switch -glob [HTTP::uri] {
          "/" {
            set HTTP::uri "/original.tool"
            node $IP $port
          }
          default {
            something else....
          }
        }
    }
    

    This assumes you've set IP and port to some values. There are probably better ways to format that switch.