The expression syntax is similar to the syntax used in Perl. Expressions are constructed from literals, variables, functions, and operators.
The following example shows an expression used in an If tag:
<If not $internal and $uri =~ "^/private/(.*)$" and $referer !~ "^https?://example.com/"> NameTrans fn="redirect" url="http://example.com/denied.jsp?file=$1" </If>
This example expression checks to see if a request meets certain criteria, for example if it is an internal request. If it does not meet the criteria, the server redirects the request to a request denied URL.
The expression contains the following components:
Literals – "^/private/(.*)$" and "^https?://example.com/"
Variables – $internal, $uri, and $referer
Operators – not, and, =~, and !~