Forum Discussion

falooda_281506's avatar
falooda_281506
Icon for Nimbostratus rankNimbostratus
Sep 09, 2016

iRule help

Hi all, I needed some assistance with creating an irule. I want to create an iRule where the following applies:

 

default traffic goes to the pool OTHER

 

test.com/ and test.com/SUNFLOWER goes to pool FLOWER

 

all test.com requests have the /SUNFLOWER URI appended

 

and all URI's are kept

 

1 Reply

  • try this irule:

    when HTTP_REQUEST {
        if {[string tolower [HTTP::host]] equals "test.com} {
            switch [HTTP::path] {
                "/" -
                "/SUNFLOWER*" {pool FLOWER}
                default { HTTP::redirect /SUNFLOWER[HTTP::uri]}
            }
        } else { pool OTHER}
    
    }