I reinstalled my Ubuntu server and had to enable the use of .htaccess files again so I am making this short tutorial for those of you who may have to do the same.
Edit your apache2.conf:
Uncomment AccessFileName .htaccess
:
Scroll up to change ‘AllowOverride’ in the document root:
AllowOverride None
to AllowOverride All
Save the file:
Restart apache:
sudo systemctl restart apache2
to restart apache if running Ubuntu 16.04sudo service apache2 restart
to restart apache if running Ubuntu 15.10 or lowerAnd now your .htaccess file should be working.