Apache Enabling mod Rewrite Debian Wheezy

Apache Enabling ModReWrite

In order to use mod_rewrite you can type the following command in the terminal:

a2enmod rewrite
service apache2 restart

Then, if you'd like, you can use the following .htaccess file.

setEnv APPLICATION_ENV development

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

The above .htaccess file (if placed in your DocumentRoot) will redirect all traffic to an index.php file in the DocumentRoot unless the file exists.

Taken from this question: