Ok, first you need to enable mod_rewrite
sudo a2enmod rewrite
sudo service apache2 restart
then open apache conf file
sudo gedit /etc/apache2/apache2.conf
uncomment this line if it is commented out
AccessFileName .htaccess
you need to change AllowOverride to Everything - note that my root is var / www / html, yours might just be var / www
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Restart apache and this should do the trick
sudo service apache2 restart
source
share