Forum Discussion
charkitp
Nimbostratus
Sep 16, 2021iRule for HTTP redirect with URL based to specific pool member
Hi There, I am working on an iRule for redirection URLs and distribute traffic to the specific pool members. below is a requirement F5 VS perform SSL offload HTTP profile with "all" rewrite_...
xuwen
Cumulonimbus
Sep 17, 2021you should use HTTP::uri to rewrite client's http request uri,
iRules:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/map1/admin*" -
"/map2/admin*" {
drop
log "Drop direct connection via admin URI"
}
"/map1/*" {
HTTP::uri [string map {"map1" "land"} [HTTP::uri]]
pool http_pool member 10.1.20.11 80
}
"/map2/*" {
HTTP::uri [string map {"map2" "land"} [HTTP::uri]]
pool http_pool member 10.1.20.12 80
}
"/land/*" {
pool http_pool
}
default {
drop
}
}
}
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