Forum Discussion
Greg_76561
Nimbostratus
Jan 28, 2011Route to different pools based on /content
Hello,
I'm new to iRules and trying to come up with a way to send traffic to different pools based on the /content in the url.
I have a secure site which the ssl certificate is ins...
Chris_Miller
Altostratus
Jan 31, 2011Just to verify, you're only trying to remove the QA/UAT string between LTM and the Pool Member? The client's will still see QA/UAT in their browser. If you're trying to remove it client-side, you'll need to do a redirect instead. I'll modify the rule assuming you're just trying to remove it between the LTM and pool member until you say otherwise.
Since I'm not solid with string first, let's do this:
when HTTP_REQUEST {
Check URI set to lower case with wildcard matching
switch [string tolower [HTTP::uri]] {
"uat*" { pool uat_pool
HTTP::uri [string range [HTTP::uri] 4 end ]
}
"qa*" { pool qa_pool
HTTP::uri [string range [HTTP::uri] 3 end ]
}
default_pool { pool qeneral_pool
}
}
}
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
