Rule syntax
When you upload Cloudlets rules using a CSV file, you use a special syntax. This syntax is also in the CSV rule you receive when you download rules.
Valid delimiter
When entering multiple values for a data type, use a space as a delimiter.
Literal usage of spaces
If you want to use a space in your CSV file, you need to type a backslash (\) first. For example, to upload a rule named “Q1 Sales Site”, you would enter it this way: Q1\ Sales\ Site.
Basic CSV file syntax
Category | Usage | Examples |
---|---|---|
Pattern Matching | ||
Case Sensitivity | :
<value1> <value2>
Note: Applies to
match type values, not the whole rule. |
ruleName,matchURL,query,result.redirectURL,result.statusCode rule 1, https://example.com, :product=ER VP, https://cloudlets.com, 302 |
Wildcards | * or ? | ruleName,matchURL,query,result.redirectURL,result.statusCode rule 1, https://example.com, product=E* FR, https://cloudlets.com, 302 |
Operators | ||
Is one of (equals) |
<value1>
<value2>... |
ruleName,matchURL,query,result.redirectURL,result.statusCode rule 1, http://example.com, product=ER FR, http://example2.com, 302 |
Is not one of (does not equal) |
!<value1> <value2>…
Note: Applies to
match type values, not the whole rule. |
ruleName,matchURL,query,result.redirectURL,result.statusCode rule 1, http://example.com, !product=ER FR, http://example2.com, 302 |
Contains any of |
*<value1>*
*<value2>*…
Note: Applies to
match type values, not the whole rule. |
ruleName,matchURL,query,result.redirectURL,result.statusCode rule 1, http://example.com, product=*ER* *FR*, http://example2.com, 302 |
Does not Contain any of |
!*<value1>*
*<value2>*…
Note: Applies to
match type values, not the whole rule. |
ruleName,matchURL,query,result.redirectURL,result.statusCode rule 1, http://example.com, !product=*ER* *FR*, http://example2.com, 302 |
And |
<value1> &
<value2>…
Important: Only
applies to these match types: cookie, extension, header, hostname, path , and query . |