DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Configuration

The extension can be configured using TypoScript. You define an array of search regexes and a matching array of replaces. Each pattern will be replaced by the replacement counterpart. If there are fewer elements in the replacement array than in the pattern array, any extra patterns will be replaced by an empty string.

The preg_replace rules apply: http://www.php.net/preg_replace.

Here is an example that prefixes all links to files in typo3temp, fileadmin and uploads with http://your.domain.tld/. This configuration can be used to set up a cookie free domain.

You may have other uses. You are totally free to do anything regular expressions allow you to do.

Constants

config.tx_replacecontent {
   host = your.domain.tld
   schema = http://
}

Setup

config.tx_replacecontent {
   search {
      1 = #(src|href)=("|')(/?)([^/]*/)?(typo3temp|fileadmin|uploads)/#
   }
   replace {
      1 = $1=$2{$config.tx_replacecontent.schema}{$config.tx_replacecontent.host}/$4$5/
   }
}