[frs-169] Using Regular Expressions in FusionReactor

Regular Expressions

Many parts of FusionReactor allow you to specify regular expressions to limit how requests are processed.

FusionReactor itself can be run in two modes (accessible from Fusion Reactor -> Settings -> FusionReactor Restrictions):

  • As a rule, ignore everything, but process requests which match any of a set of expressions
  • As a rule, process everything, but ignore requests which match any of a set of expressions

This functionality can be found in several other FR modules: Crash Protection, Compression and Content Filters.

Regular Expressions are a sort of pattern language. You might think of them as a sort of sieve: requests are matched against the sieve, and any which fall through (i.e. match) are processed (or ignored, depending on the setting mentioned above).

While it's not within the scope of this technote to go into detail about how to construct regular expressions, we have collected together some references and utilities to help you define regular expressions. These links are at the end of this article.


In the examples below, we'll talk about matching requests which should be ignored, using the FusionReactor global restrictions list (Fusion Reactor -> Settings -> Restrictions) in Ignore requests that mach the rules mode. In this mode, FusionReactor will process everything, except requests which match any rule set in the 'Restrictions' page.

If you want to try these out, be careful to copy and paste on the bold text, ensuring you have copied the entire expression.

  • Exclude everything under a the '/fr/excludeme' folder:
    • /fr/excludeme/.*
  • Exclude everything that contains the string 'batch':
    • *batch*
  • Exclude everything under the '/nightly'and '/weekly' folders
    • Either use two separate rules:
      • /nightly/.*
      • /weekly/.*
    • Or use one rule which combines the two expressions:
      • (/nightly/.*)|(/weekly/.*)


Issue Details

Type: Technote
Issue Number: FRS-169
Components: Compression, Content Filters, Crash Protection, Request Managment
Resolution: Fixed
Last Updated: 25/Sep/07 5:00 PM
Affects Version:
Fixed Version:
Related Issues: