Please try the following iRule, using a switch statement can avoid a lot of repetition (it is also faster than using if). As suggested above a policy may be an alternative.
I have added logging to try to determine which conditions are being matched, please test and share the logging outputs, masking any sensitive information if necessary
when HTTP_REQUEST {
switch [string tolower [HTTP::path]] {
"/lmsserver" -
"/oauth" -
"/dtpcms" {
pool PLMS_Pool
log local0. "Path is [HTTP::path] selecting pool PLMS_Pool"
}
"/lms/sso" -
"/lms/rest/ext/oauth2/token" {
pool PLMS_Pool
HTTP::path "/lmsserver"
log local0. "setting Path to [HTTP::path] selecting pool PLMS_Pool"
}
"/httppush" {
pool Push_Pool
log local0. "Path is [HTTP::path] selecting pool Push_Pool"
}
"/admin" -
"/lms" {
pool PTEACH_Pool
log local0. "Path is [HTTP::path] selecting pool PTEACH_Pool"
}
"/rsp" -
"/dwh" {
pool PTDWH_Pool
log local0. "Path is [HTTP::path] selecting pool PTDWH_Pool"
}
"/" {
HTTP::redirect "http://[HTTP::host]/lms"
pool PTEACH_Pool
log local0. "Path is [HTTP::path] selecting pool PTEACH_Pool and sending redirect to http://[HTTP::host]/lms"
}
}
}