mod_rewrite must be enabled before being used on an Apache server.
Run a2enmod rewrite
Then restart Apache with service apache2 restart
Add or uncomment the following line in the static configuration file (such as httpd.conf
):
LoadModule rewrite_module modules/mod_rewrite.so
Then restart Apache.