Apache 2.4 provides the following 6 directives via the mod_rewrite module:
The following directives, available previously in Apache 2.2 have been removed:
All the directives (with the exception of RewriteMap) defined by mod_rewrite can be allowed to override on a per-directory .htaccess through the AllowOverride FileInfo.
| Directive | Context | Description |
|---|---|---|
| RewriteBase | directory, .htaccess | Sets base URL for per directory rewrite |
| RewriteCond | Everywhere | Defines conditions under which the rewrite action will occur |
| RewriteEngine | Everywhere | Sets status of rewrite engine |
| RewriteMap | server config, virtual host | Defines a key lookup function |
| RewriteOptions | Everywhere | Sets special options for rewrite engine |
| RewriteRule | Everywhere | Defines specific rules for rewrite engine |
The context Everwhere means that the directive can be defined in any of the following four locations:
The RewriteLog and RewriteLogLevel directives have been merged with the global LogLevel directive and would be used as:
LogLevel rewrite:<level>
where <level> is a value from trace8 (least significant) to emerg (most significant). This list is available here.