Hi,
I would recommend first combining all of the logic into one event. Your example switch statement used the "string tolower" function but the matching values were capitialized. You may also consider adding a default section if you have some other condition to match.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"sitea.com" {
if { [HTTP::uri] ends_with "/" } {
HTTP::redirect "http://192.168.0.0/subdirectory"
}
}
"siteb.com" { pool B }
"sitec.com" { pool C }
}
}
If you are testing an iRule but it won't load, check the /var/log/ltm log file to see if any runtime error messages are logged.
Hope this helps.
-Josh