Forum Discussion
mjacobs_189214
Nimbostratus
Feb 25, 2015Forwarding request to server based on URL directory (and files inside it)?
Hello all,
I've searched and found nothing that i'm looking for. I've got a request from an internal team that they need to forward user requests who hit webpage behind a particular directory.
I...
Brad_Parker
Cirrus
Feb 25, 2015Well if you are going to have pool selection based on hostname and URI you will have to combine them or else they could conflict and not process they way you want. You could do someting like this which will prioritize the pool selection on the URI first then select to pool based on hostname if the URI doesn't match. Before throwing it in production I would try it in a non-prod first if at all possible.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/specific_directory" } {
pool
}
else {
switch [string tolower [HTTP::host]] {
www.domain.com { pool }
secure.domain.com { pool }
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
