Forum Discussion
jburford2
Nimbostratus
Mar 30, 2022URL and URI redirect
My F5 has one virtual server for all URL's. I need to set a pool based on one of two matching URL's and a matching URI. the code below is what I am trying, the F5 gives me error everytime I try to up...
T-Trust
Cirrostratus
Apr 08, 2022Hi I would like to sent solution that relate about your requirement, Please find the irules below,
when HTTP_REQUEST {
set httphost [string tolower [HTTP::host]]
set httpuri [string tolower [HTTP::uri]]
if { ($httphost contains "x1") && ($httpuri starts_with "/y1") } {
pool pool1
} elseif { ($httphost contains "x2") && ($httpuri starts_with "/y2") } {
pool pool2
} else {
pool pool3
}
}
Please find detail of irules in link below,
https://cloud-ttrust.com/f5-irules-check-http-host-and-uri/
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