sudo nano /etc/apache2/apache2.conf
Scroll down until you find Directory /var/www/>.
Change AllowOverride None to AllowOverride All. Save the file and quit (Ctrl + X and and Y).
Enable mod_rewrite for .htaccess
sudo a2enmod rewrite
Restart the server
sudo systemctl restart apache2
This is what worked for me and hope it'll work for you too.
Top comments (0)