RewriteCondition

Name

RewriteCondition -- Define a rule condition

Synopsis

RewriteCondition [ condition pattern]

Default

None

Context

server config, <Global>, <VirtualHost>, <Anonymous>, <Directory>

Module

mod_rewrite

Compatibility

1.2.6rc1 and later

Description

The RewriteCondition directive defines a rule condition. Precede a RewriteRule directive with one or more RewriteCondition directives. The following rewriting rule is only used if its pattern matches the current state of the FTP command and if these additional conditions apply too.

Condition is a string which can contain the following expanded constructs in addition to plain text:

Pattern is the condition pattern, i.e., a regular expression which is applied to the current instance of the condition, i.e., condition is evaluated and then matched against pattern. You can prefix the pattern string with a '!' character (exclamation mark) to specify a non-matching pattern.

See also

RewriteRule RewriteMap

Examples