Forum Discussion

Marcello_Costa_'s avatar
Marcello_Costa_
Icon for Nimbostratus rankNimbostratus
Oct 20, 2017

Irule to different virtual server on different route domain/partition

Hello Guys, I have one question about iRule confection. I created on iRule to redirect HTTP request to different Virtual Servers based on http subdomain of urls. The problem is that I need redirect these traffic to a Virtual Server on different Partition and Route Domain, I didn't found any solution for this. Are there the possibility to do this type of redirecting? iRule: when HTTP_REQUEST { switch [HTTP::host] { "xxxx.com.br" { virtual (virtual server) } "xxxx.com.br" { virtual (virtual server) } "xxxx.com.br" { virtual (virtual server) } } }

 

1 Reply

  • Given your iRule below see if this works.

    when HTTP_REQUEST { 
        switch [HTTP::host] { 
            "xxxx.com.br" { virtual /Partition/(virtual server) }
            "xxxx.com.br" { virtual /Partition/(virtual server) } 
            "xxxx.com.br" { virtual /Partition/(virtual server) }
        }
    }
    

    However given the nature of partition security it may not allow you refer to a virtual server in another partition. In that case you may be forced to send them back a 302 redirect and the client will connect directly to the virtual server.