How to enable htaccess for Apache on Ubuntu
Setup mod_rewrite for Apache on Ubuntu. A short step by step guide to get started.
This is a step by step by guide to get your modrewrite working for apache on ubuntu.
1) Enable mod_rewrite
sudo a2enmod rewrite
Restart Apache
sudo systemctl restart apache2
2) Setup .htaccess
sudo nano /etc/apache2/sites-available/000-default.conf
Make sure to add the following directory code on your site virtual host
VirtualHost *:80> <Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> . . . </VirtualHost>
Restart Apache
sudo systemctl restart apache2
Now you can create your .htaccess files
More Instructions: https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-16-04