Hi dlogsdonmd,
a nested
[if]
iRule structure shouldn't be that complex to setup. You may take a look to the syntax below to see how your initial requirement can be glued within a rather simple iRule...
when HTTP_REQUEST {
Parse the requested HOST-Name using lower case formating...
set low_host [string tolower [HTTP::host]]
if { $low_host equals "support.domain.org" } then {
Valid HOST-Name detected. Parse the requested PATH using lower case formating...
set low_path [string tolower [HTTP::path]]
if { $low_path starts_with "/customer" } then {
Redirect the request...
HTTP::redirect "https://support.domain.org/servicedesk/customer/portals"
} elseif { $low_path starts with "/agents" } then {
Redirect the request...
HTTP::redirect "https://support.domain.org/secure/Dashboard.jspa"
} else {
Allow the request?
}
} else {
Invalid HOST-Name requested
HTTP::respond 404 content "Unrecognized request to [HTTP::host][HTTP::uri]" "Content-Type" "text/html"
}
}
Note: The provided iRule uses a slightly more advanced syntax, by checking the requested Path/URI using lower case formating (more accurate).
Cheers, Kai