Forum Discussion
xuwen
Sep 17, 2021Cumulonimbus
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, 2021Nimbostratus
Thanks, xuwan for your response. i'll retest the iRule and confirm the soltuion
CK