Forum Discussion

maxas_59256's avatar
maxas_59256
Icon for Nimbostratus rankNimbostratus
Mar 25, 2012

HTTP: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

  • 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
  • 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!