Enabling mod_rewrite on Apache

To enable the mod_rewrite module:

LoadModule      rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

To enable for  specific <Directory> entry:

RewriteEngine On

To specify a rewrite pattern:

RewriteRule matchpattern rewriteto