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, 2015Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/specific_directory" } {
pool
}
else {
pool
}
}
mjacobs_189214
Nimbostratus
Feb 25, 2015Ah, I see, thank you for the help Brad.. Question, can I roll this into my switch iRule that "looks" at host headers or do I need to create a new iRule and apply it to my Virtual Server? Below is a sample switch iRule which i'm hesitant to update since it's production, thank you again!
when HTTP_REQUEST {
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
