FortiDirector
FortiDirector uses conditions to determine if a redirector Rule is a match for a given request.
tdietrich
Staff
Staff
Article Id 195033
Description

Regular Expression matching follows the Unicode Technical Report #18: Unicode Regular Expression Guidelines. Unlike Perl based regexes (which are POSIX-based), the unicode regular expressions don't assume or try substrings by default.  This means you have to craft a pattern that strictly matches the entire URL, supplying wildcards where you otherwise wouldn't in text editors that have their own regex engines.

Implicit Flags: All regexes use global flags.

/g : Global Search is always assumed and cannot be overridden.

/i : Case In-sensitive search is always assumed and cannot be overridden.

Example Regular Expression matches:

  • Match any .jpg
.*\.jpg$
  • Match specific directory structure
^assets\/images\/.*
  • Match on a specific hash in the middle of the URL, e.g. http://test.domain.com/b9805fca-b3a0-4ce0-9c21-ac7f482c1d06/r/img.gif
.*b9805fca\-b3a0\-4ce0\-9c21\-ac7f482c1d06.*

Contributors