Enable .htaccess on apache2

In the file:/etc/apache2/sites-enabled/000-default.conf

Look for the line:

AllowOverride None

and change it to:

AllowOverride All

on all lines.

Alternately, a single line of sed can achieve this:

sed -i 's/AllowOverride\ None/AllowOverride\ All/g' /etc/apache2/sites-enabled/000-default.conf

Restart apache.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.