Forum Discussion

daemien_139983's avatar
daemien_139983
Icon for Nimbostratus rankNimbostratus
Apr 08, 2014

URI redirect

Hi All,

 

I'm trying to setup a uri redirect. what i would like to do is

 

https://somwething.com/ > go to node 1 in the pool

 

https://something.com/something/loging.aspx > go to node 2 in the pool

 

Any ideas?

 

  • You should assign something like the following iRule to your virtual server:

    when HTTP_REQUEST {
        if { [HTTP::uri] == "/" } {
            pool POOL member MEMBER1 443
        }
        elseif { [HTTP::uri] == "/something/loging.aspx" } {
            pool POOL member MEMBER2 443
        }
    }
    
  • You should assign something like the following iRule to your virtual server:

    when HTTP_REQUEST {
        if { [HTTP::uri] == "/" } {
            pool POOL member MEMBER1 443
        }
        elseif { [HTTP::uri] == "/something/loging.aspx" } {
            pool POOL member MEMBER2 443
        }
    }
    
  • Depending on your software version, you can use HTTP Class Profile. It is a graphical way to solve basic irule solutions.