mod_rewrite does not work on Ubuntu 16.04

0

I have a VPS with Ubuntu 16.04 but I am not able to make the mod_rewrite work. When I get the command sudo a2enmod rewrite , I get the following response:

  

"Module rewrite already enabled"

But when I run phpinfo() , the "Configuration - > apache2handler - > Loaded modules" session does not appear.

My 000-default.conf looks like this:

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

In Windows the "Configuration -> apache2handler -> Loaded modules" section appears normally.

    
asked by anonymous 06.11.2018 / 01:40

1 answer

0

Edit your file sudo nano /etc/apache2/sites-available/seusite.conf

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

Save and restart apache sudo service apache2 restart

Edit also sudo nano /var/www/html/.htaccess

add this line

  

RewriteEngine on

    
04.12.2018 / 03:42