Add/Edit Rules
To define a single condition (test), you can specify ReqField, ReqOp, and ReqVal in a Rule. For more complex conditions, use the Tests option and define the test conditions separately.
- Setting
- Description
-
Name
- Name of the rule
-
Description
- User-readable description of the rule, which also displayed in
privacy.cfg
. -
ReqField
- This option specifies the name of a field, the name portion of
a name-value pair, in the request file. The value of this field is
used for comparison. You can also apply one of following special field
names:
-
TL_URLEXT
- The file extension portion of the URL -
TL_URLTAIL
- The tail of the URL, which includes the last/
in the URL and everything that is following it -
TL_VIRTUALDIR
- The virtual directory portion of the URL
-
-
ReqOp
- ReqOp defines the comparison operation that is performed by this
rule between ReqField and ReqVal. Following are the valid values for
this option:
-
EQ
or=
- True if the field value equals ReqVal. String comparison is case-insensitive -
NE
or!=
- True if the field value does not equal ReqVal. String comparison is case-insensitive -
GT
or>
- True if the field value is greater than ReqVal -
LT
or<
- True if the field value is less than ReqVal -
CONTAINS
- True if ReqVal is contained in the field value -
PARTOF
- True if the field value is part of (contained in) ReqVal -
PARTOFLIST
- True if the field value matches one of the values in ReqVal.- The list of values in ReqVal can be delimited by semicolons or other delimiter specified by the ListDelimiter property.
-
-
ReqVal
- Literal value or field name (set
ReqValIsField=True
for field name). WhenReqOp=PARTOFLIST
, this setting must specify a list of values that are separated either by a semicolon or another delimiter (specified by usingListDelimiter
).- If
ReqField
is set toTL_URLEXT
, this field contains the extensions that are including periods.
- If
-
TestOp
- Logical operator to use when multiple tests are specified. Possible
values are
AND
andOR
. If no value is specified,AND
is applied as the default value.- When
TestOp=AND
, all tests must returnTrue
for the actions to be processed. - If
TestOp=OR
, the actions are processed if any of the tests returnTrue
.
- When
-
List Delimiter
- The character used to separate list items in ReqVal when using
the
ReqOp=PARTOFLIST
. The default is a semicolon (;
). -
Case Sensitive
-
True
orFalse
value that is indicating whether the searches for field names must be case-sensitive. Default isFalse
. Setting this toTrue
speeds up searches. -
ReqValIsField
-
True
orFalse
indicating whetherReqVal
contains a field name. -
Not
-
True
orFalse
value. IfTrue
, then the result of the test evaluation is inverted (logicalNOT
). -
Stop Processing
-
True
orFalse
value that is indicating whether to stop processing further rules if this rule evaluates toTrue
. -
Enabled
-
True
orFalse
Value which specifies whether this rule is active. -
Actions
- One or more action names which correspond to the names of action
sections to process if this rule returns
True
. -
Tests
- One or more test names which correspond to the names of test sections. The specified tests are evaluated to determine whether the actions is ran for the rule. If no test is specified (and no embedded test specified as described below), then the actions are run for every hit.