Forum Discussion
Kai_Wilke
Feb 07, 2017MVP
Hi MegaNoob,
you may try the iRule below...
when HTTP_REQUEST {
set low_path [string tolower [HTTP::path]]
if { $low_path equals "/" } then {
HTTP::redirect "/analytics/"
} elseif { $low_path starts_with "/analytics" } then {
log local0. " .. starts_with /analytics"
pool BI02-9003-Pool
} elseif { ( $low_path starts_with "/em" )
or ( $low_path starts_with "/console" ) } then {
if { [class match [IP::client_addr] equals OBIEE_Allowed_Access] } then {
Allow trusted clients
log local0. "[IP::client_addr] is permitted to site /EM or /CONSOLE"
pool BI02-9001-Pool
} else {
Drop untrusted clients
log local0. "[IP::client_addr] is not permitted to site /EM or /CONSOLE"
drop
}
} else {
You may add a drop or HTTP::respond here if you need to deny access outside of /em, /console or /analytics
}
}
Note: The iRule uses a
syntax to make the rule-set case-insensitiv. In addition to that the iRule now uses a [string tolower [HTTP::path]]
notation, so that the execution will stop if the requested path already matched one of your rule-sets.if...elseif...else
Cheers, Kai