Saw one mistake in the code so slight adjustment. Also added a log at the beginning just to be sure of what we're seeing:
when HTTP_REQUEST {
log local0. "Host is [HTTP::host], URI is [HTTP::uri]"
if { ([active_members [LB::server pool]] == 0) && ([string tolower [HTTP::host]] starts_with "abc.webserver.com") } {
HTTP::redirect "http://sorrypage.net/default_api.aspx"
} elseif { ([active_members [LB::server pool]] == 0) && ([string tolower [HTTP::uri]] starts_with "/identity/issue/oauth2/token") } {
HTTP::redirect "http://sorrypage.net/default_api.aspx"
} elseif { ([active_members [LB::server pool]] == 0) } {
HTTP::redirect "http://maintenance.cloudapp.net"
}
}