Enable Clean Url in Drupal 8 Ubuntu


Enable mod_rewrite for Apache

a2enmod rewrite

Now edit the 000-default.conf located at /etc/apache2/sites-available/

Sudo gedit /etc/apache2/sites-available/000-default.conf

Add the below mentioned lines just under DocumentRoot /var/www/html

    DocumentRoot /var/www/html
    <Directory /var/www/html>
        AllowOverride All
        Order Allow,Deny
        Allow from all
    </Directory>

This will add AllowOverride within the default website configuration

Make sure .htaccess is in the default web directory!

ls /var/www/html/.htaccess

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s