Tagged rewrite rule sets

As the rewrite process proceeds it may be appropriate to bring different sets of rules into play. This is accomplished by the use of the rewrite rule tag. The current tag is prepended to each pattern before looking it up in the configuration file (legacy configuration) or  group (Unified  Configuration), or domain database. The tag can be changed by any rewrite rule that matches by using the  substitution string in the rewrite rule template (described below).

Tags are somewhat sticky; once set they will continue to apply to all hosts that are extracted from a single address. This means that care must be taken to provide alternate rules that begin with the proper tag values once any tags are used. In practice this is rarely a problem since tags are usually used in only very specialized applications. Once the rewriting of the address is finished the tag is reset to the default tag --- an empty string.

By convention all tag values end in a vertical bar. This character is not used in normal addresses and thus is free to delineate tags from the rest of the pattern.

See Section 2.2.6.19 for an example of using tagged rewrite rules.

See also:
 * The rewrite group
 * Rewrite rule patterns and tags