Forum Discussion
Moe_Jartin
Cirrus
Jan 05, 2009Context Root Masking/URL Rewrite and pool selection
I have an existing iRule that simply selects poolA based on a list of URIs, everything else goes to poolB.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
...
Moe_Jartin
Cirrus
Jan 06, 2009OK so new requirement... On the HTTP_RESPONSE I need to only remove the /contextroot for the masked URIs. I initially thought to try:
if {[matchclass [[string tolower [HTTP::uri]] starts_with $::maskedURIs] and [[HTTP::header value "Content-Type"] contains text]}
STREAM::expression "@/contextroot$::maskedURIs@@"
STREAM::enable
but then I realized that HTTP::uri would only catch the headers and NOT the body, if it worked at all. It there a way to search the HTML response for /contextroot/$::maskedURIs and then remove just the /contextroot ???
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
