Apache enable htaccess

20.Aug.2013

If .htaccess is not working on your Apache it is possible that it is not enabled. To enable .htaccess on Apache edit following file:

/etc/apache2/sites-available/default

Locate following line:

AllowOverride None

and replace it with:

AllowOverride All

Finally – run following two commands

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

Notice: This instruction on how to enable .htaccess on Apache is meant only for Apache2.