Name
RewriteCond
Synopsis
RewriteCond TestString CondPattern Server config, virtual host, directory
One or more
RewriteCond
directives can precede a
RewriteRule
directive to define conditions under
which it is to be applied. CondPattern
is
a regular expression matched against the value retrieved for
TestString
, which contains server
variables of the form
%{
NAME_OF_VARIABLE
}
,
where NAME_OF_VARIABLE
can be one of the
following list:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
These variables all correspond to the similarly named HTTP MIME
headers, C variables of the Apache server, or the current time. If
the regular expression does not match, the
RewriteRule
following it does not apply.
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.