Forum Discussion
Harki_35330
Nimbostratus
May 13, 2008Underscore in URI causing problems?
I have a simple iRule as below but it is not working. I checked the URI in the logs and it is: /2076_PHX/configws.asmx
However it is not going to the correct pool. I have tried escapign the underscore too as below. Any ideas whats happening here?
when HTTP_REQUEST {
set DEBUG 2
if { $DEBUG > 1 } { log local0. "Request: [URI::decode [HTTP::uri]] " }
if {[string tolower [HTTP::uri]] contains "2076\_PHX/" }
{ if { $DEBUG > 1 } { log local0. "Sending request to XM Prod pool" }
pool p_2076_XM_PROD
} elseif {[string tolower [HTTP::uri]] contains "2076\_ST1/" }
{ if { $DEBUG > 1 } { log local0. "Sending request to XM stag pool" }
pool p_XM_STG
} elseif {[string tolower [HTTP::uri]] contains "2076/PHXAssembly" }
{ log local0. "Sending request to assembly _pool"
pool p_XM_Assembly
} elseif {[string tolower [HTTP::uri]] contains "2076\_dashprod/" }
{ if { $DEBUG > 1 } { log local0. "Sending request to dashboard pool" }
pool p_2076_XM_Dashboard
}
}
- Colin_Walker_12Historic F5 AccountYou shouldn't need to escape the underscore in the contains statement. When you say it's not going to the correct pool, what do you mean? What exactly is happening?
- Harki_35330
Nimbostratus
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