mod-rewrite Getting started with mod-rewrite Using mod_rewrite in the static configuration file


Example

Add the following directive before using any other mod_rewrite directive (RewriteRule, RewriteCond, RewriteBase or RewriteMap).

RewriteEngine on

By default the engine is turned off. mod_rewrite directives found while the engine is turned off are ignored. Enable it from within the virtual host context when using virtual hosts, or from specific directory contexts when applicable.