Pool selection based on URI
Hi, I'm running into an issue where i'm trying to select a pool based on the URI.
For example, when we go to http://site.com/app1, it goes to pool p_app1 and when we go to https://site.com/app2, it goes to pool p_app2. Here is the simple iRule i've created.
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/app1" {
pool p_app1
HTTP::uri "/app1/"
}
"/app2" {
pool p_app2
HTTP::uri "/app2/"
}
}
}
The problem I have is that it works fine for app1 but not for app2.
When I enter http://site.com/app2/, it gives a 404 not found. When I enter http://site.com/app2, it works and the app redirects to http://site.com/app2/login. When I try to log into the page, it waits a long time and finally gives a "This page can’t be displayed".
Both apps work perfectly when accessed internally no matter is there is a trailing slash or not.
The issue is that i'm not the one who developped the so called website and cannot find any documentation.
Do any of you guys have ever ran into something like this and can you help out?
Thanks !