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 co...