Enable mod_rewrite on Apache for Debian

To enable and load mod_rewrite, do the following.

$ sudo a2enmod rewrite

Then open up the following file, and replace every occurrence of “AllowOverride None” with “AllowOverride all”.

$ sudo vi /etc/apache2/sites-available/default


$ sudo vi /etc/apache2/sites-available/000-default

Finally, restart Apache2.

$ sudo service apache2 restart

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.