Forum Discussion

bcronin_360231's avatar
bcronin_360231
Icon for Nimbostratus rankNimbostratus
May 02, 2018

iRule to redirect application to pool and change url

When setting up a f5 irule, I am trying to do the following:

When an external url is hit, redirect to an internal pool of servers based on a url. Example:

external=

I want this to map to server pool of urls:

server1.com:8080/application or server2.com:8080/application or server3.com:8080/application

I need it to only direct if the server url is up. Does anyone have an idea?

Basicly going to ww.abc.com/test redirect/proxies to server2.com:8080/application/test.

and

redirect/proxies to server2.com:8080/application.

This is what I have so far:

when HTTP_REQUEST {
    switch -glob [string tolower [HTTP::path]] {
    "/application*" {
            pool This_abc.com_WEB-R_8080
                snatpool WEB-R_SNAT_Pool
        }
    }
}

1 Reply

  • I think you will be better off configuring the server to accept "; domain traffic instead of "server1.com" etc. Any reason for not doing this ?