New Application using different different backend applications with same URL

We have an application that has been running on Apache with a backend WebLogic instance.

The application URL for for example is https://application.abc.com There are 2 Locations setup in Apache which go to 2 different backend WebLogic instances.

https://application.abc.com/prod This goes to server prod.internal.abc.com:8000

https://application.abc.com/prod2 This goes to server prod2.internal.abc.com:8010

Is there a way within the F5 LTM to have one VIP, but based on what is after the main URL to go to different backend servers?

Thanks, Dave

Absolutely. Here’s what the iRule might look like:

when HTTP_REQUEST {
    switch -glob [HTTP::uri] {
        "/prod2*" { pool prod2_pool }
        "/prod*" { pool prod_pool }
    }
}

The important thing here is that you put the more specific entry first in the list. Starting with “/prod*” would match on everything. You’d then create two separate pools for your application servers.

You can also do the exact same thing with a traffic policy without touching iRules.