Regular Expressions

The configuration values of securedDirs, securedFiletypes, domain and forcedownloadtype allow regular expressions. All expressions will be handled case insensitive.


The slash character (/) is automatically quoted for your convenience.


The following are a few examples of the securedDirs configuration option:

For example, if you need to secure the fileadmin and the typo3temp directory, but not an uploads directory, you can simply write:


To secure files underneath of fileadmin/secure or typo3temp, you need to write:


You also can group some elements with regular expression, but you should be careful with grouping, because complex regular expressions in the extension does not work if some other matches occur by the expression.

For grouping ( ) is used, but in our case you need to exclude the result of this ( ). This can be done with (?: )

For example, we want to secure files underneath fileadmin/secure1, fileadmin/secure2, fileadmin/secure3 and typo3temp:


You can achive the same result be using square brackets [ ], but keep in mind that all characters between the brackets are allowed here:


If you need to exclude some subdirectories within a secured directory, you can use the Elvis Operator (?! ):


Last but not least, you can store all your protected files within different subdirectories having the same name. In this example we use “secure” as directory name:


This will secure files within fileadmin/foo/secure and also within fileadmin/bar/secure.


More information can be found here: