Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

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) } } }

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0
Comments on this Answer
Comment made 2 weeks ago by Marcello Costa 2

Thank you David, it worked fine.

0