Forum Discussion
iRule for HTTP redirect with URL based to specific pool member
you 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
}
}
}
- charkitpSep 19, 2021
Nimbostratus
Thanks, xuwan for your response. i'll retest the iRule and confirm the soltuion
CK
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
