Forum Discussion

Tom_DeBoeser's avatar
Icon for Nimbostratus rankNimbostratus
May 19, 2022

iRule route traffic based on URI


  I've searched and used some irules trying to route browser connections based on the URI.  The problem I'm running into is there are many web instances on one host.  And the instances listen on multiple ports.

So simple enough:


ltm rule /Common/fusion-ports {

switch -glob [HTTP::uri] {
    "/admin*" {
        node 8087
        log local0. "admin match"
    "/Testing8*" {
        node 8089
        log local0. "test8 match"
    "/Testing9" {
       node 8090
       log local0. "test9 match"
    default {
        HTTP::redirect "[HTTP::host]:8087
        log local0. "default match"



I've used "pool" and [HTTP::redirect].  The problem is the website redirects, which changes the URI.  So I've tried inserting and using a combo of URI/cookie matching, but it doesn't work.  I get the same results.  ( can provide that code, if needed ). 

One of my questions is, has anyone had experience trying to do something similar?  My second question is, does the pool members' redirect take precedence over F5's cookie insertion?  tcpdump and logs don't help with this.



2 Replies