Translations:Manual:Short URL/Apache/30/en

The $RewriteCond directive defines a condition that must be true before a RewriteRule that follows it may be applied. One or more RewriteCond directives may precede a RewriteRule directive, and all the RewriteCond directives that precede a RewriteRule must be true before that rule may be applied to a URI. In the examples that follow, $TestString takes the form of a reference to server variables, e.g. $code1. Although many $CondPatterns exist, the examples that follow use $f (true when TestString is a regular file) and $d (true when TestString is a directory), and they are preceded by a negation symbol, $!.