How to turn on mod_rewrite in Apache

Turn on mod:

a2enmod rewrite

In your .conf file (e.g. 000-default.conf) add the following in your vhost configuration section:

<Directory /var/www/html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
</Directory>