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

or

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

Finally, restart Apache2.

$ sudo service apache2 restart
Share

Leave a Reply