Forum Discussion
Anand_128528
Feb 05, 2014Nimbostratus
Combine Client accepted and http_request.
I have an requirement to forward a source IP to particular pool member. Since I already have http_request configured is it a good idea to add client_accepted into the same irule ?
when HTTP_REQUEST {...
Kevin_Stewart
Feb 05, 2014Employee
Try this:
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals src.src.src.src] } {
pool my_pool member dst.dst.dst.dst
} elseif { [string tolower [HTTP::host]] == "fqdn" } {
HTTP::redirect "https://fqdn/irj/portal/" pool pool_t_portal
} elseif { ( [HTTP::uri] equals "/" ) or ( [string tolower [HTTP::uri]] equals "/index.html" ) or ( [string tolower [HTTP::uri]] equals "/webdynpro/welcome/welcome.jsp" ) } {
HTTP::redirect "https://[HTTP::host]/irj/portal/"
} elseif { ( [HTTP::uri] starts_with "/~" ) and ( [string tolower [HTTP::uri]] ends_with "index.html" ) } {
HTTP::redirect "https://[HTTP::host]/irj/portal/"
} elseif { ( [string tolower [HTTP::uri]] starts_with "/uddiclient" ) or ( [string tolower [HTTP::uri]] equals "/uddiclient/process" ) } {
HTTP::redirect "https://[HTTP::host]/irj/portal/"
} elseif { [string tolower [HTTP::uri]] equals "/nwa" } {
HTTP::redirect "https://[HTTP::host]/irj/portal/"
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects