You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`mod_rewrite` uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly.
To enable the rewrite module :
```
sudo a2enmod rewrite
```
You need to restart the webserver to apply the changes:
```
sudo service apache2 restart
```
If you plan on using mod_rewrite in `.htaccess` files, you also need to enable the use of `.htaccess` files by changing `AllowOverride None` to `AllowOverride FileInfo`.
For the default website, edit `/etc/apache2/sites-available/default`:
```
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
# changed from None to FileInfo
AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
```
After such a change, you need to restart Apache again.