Jan_384807
Feb 27, 2019Nimbostratus
irule based on URI to select pool redirected back to http
Hi, I need help here.
I'm using the same VS to create a irule to redirect to different server pools based on URI. The irule which I created redirects back to http which is not what I'm expected.
- test.abc.com -> default poolA -> https://test.abc.com [expected result - OK]
- test.abc.com/testing -> redirects to test.abc.com/homepage -> poolB
- test.abc.com/homepage -> poolB
For both 2. and 3., both were redirected to http://test.abc.com/homepage/login.
SSL offloading is on F5.
I'm expecting https://test.abc.com/homepage/login instead but I'm not getting it.
Any expert advice is appreciated. Thanks!when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set uri [HTTP::uri]
if { $host contains "test.abc.com"}{
if {([string tolower [HTTP::uri]] starts_with "/testing") }{
HTTP::redirect "https://$host/homepage
pool "poolB"
}
if { [string tolower [HTTP::uri]] starts_with "/homepage" }{
pool "poolB"
}
}
}