Skip to content

Message when rewrite is not set

Vinzenz Hersche edited this page Jun 11, 2018 · 2 revisions

This message appears, if the rewrite-rules are wrong. It's here, because it's a good howto.

Error. Oops you've encountered an error

It appears that either something went wrong or the mod rewrite configration is not correct.

If you don't use apache, just let .htaccess stay or create a empty file - then this check will pass.

We need to allow Apache to read .htaccess files located under the directory. You can do this by editing the Apache configuration file:

Find the section <directory /var/www/html> and change AllowOverride None to AllowOverride All

sudo nano /etc/apache2/apache2.conf

After editing the above file your code should be like this:

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

In order to use mod_rewrite you can type the following command in the terminal:

sudo a2enmod rewrite

Restart apache2 after

sudo /etc/init.d/apache2 restart

or

sudo service apache2 restart
Clone this wiki locally