Forum Discussion
Mohammad_1363
Aug 27, 2021Altocumulus
iRule that can forward traffic based on endpoint and http-method
Hello iRule Guru currently i have an iRule that is doing two things, 1: if the http uri has /path1/example/ or /path2/example/ the traffic should go to pool-example 2: then if host equals api.examp...
xuwen
Aug 27, 2021Cumulonimbus
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/path1/example/" or [string tolower [HTTP::uri]] starts_with "/path2/example/"} {
pool pool-example
} elseif { [string tolower [HTTP::host]] equals "api.example.com" } {
HTTP::header replace "Host" "api.newexample.com"
pool api-newexample-com
} elseif { ([HTTP::method] eq "POST") and ([HTTP::uri] contains "version2/sport1") } {
pool sport_pool
}
}
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