Forum Discussion
maxas_59256
Nimbostratus
Mar 25, 2012HTTP:uri NOT contain
Hi,
Can someone help me with following?
I am trying to add additional condition (http:query not contain) after the 'and'.
This way it doesn't work:
if { [[string tolower [HTTP::path]] contains "/abc/" || [string tolower [HTTP::path]] contains "/abc?"] && [not[string tolower [HTTP::query]] contains "def"]}
Thanks!
2 Replies
- hoolio
Cirrostratus
Hi Maxas,
What's the order of precedence you want? A || B && C isn't clear to me. Also, what are you trying to do with the ? in the second check? Are you trying to match a literal ? or any single character? Here's a guess at what you're trying to do:
if { ([string tolower [HTTP::path]] contains "/abc/" || [string tolower [HTTP::path]] contains "/abc?"]) and not ([string tolower [HTTP::query]] contains "def")}
Aaron - maxas_59256
Nimbostratus
Hoolio,thank you for quick and helpful response!
I am trying to find some string like "/max/" or "/max?" in request URL in http:path , and make sure that there is no string "maxas" in the same request ,in http:uri.
If meet these conditions - perform redirect.
Anyway,it works now.
Thanks again!
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