Enable mod_rewrite module using ‘a2enmod’ (Apache2 Enable Module tool) with sudo permissions:
1 2 3 |
sudo a2enmod rewrite |
1 2 3 4 5 |
Enabling module rewrite. To activate the new configuration, you need to run: service apache2 restart |
Then restart Apache to activate:
1 2 3 |
sudo service apache2 restart |
That’s it!
If you ever need to disable this module:
Disable mod_rewrite module using ‘a2dismod’ (Apache2 Disable Module tool) with sudo permissions to disable “rewrite”:
1 2 3 |
sudo a2dismod rewrite |
1 2 3 4 5 |
Module rewrite disabled. To activate the new configuration, you need to run: service apache2 restart |
And then restart Apache to activate the changes:
1 2 3 |
sudo service apache2 restart |