“Drupal Clean url” work in peace !

I have struggled for many weeks now to make the clean_url feature work for Drupal 7 and 8 in my Ubuntu local instance. I have tried and read many tutorials till I recently finally found what the issue was.

I have enabled the mod_rewrite module of Apache months back but what I was missing is the “AccessFilename” and “AllowOverride All” directives.

After several error messages and a deep breath I figure out that : the “AccessFilename . htaccess” should be place just after the prior to all definition just after the

<VirtualHost *:80>

and also alll the override in in the Document root directory

<Directory /var/www>
# other directives
AllowOvveride All
# other directives

The good thing is tat I have learned how to disable the clean url when you don’t have access to the interface page to disable it. Prior to Drupal 7 you can manually edit the row of the clean_url in the “variable” table.

In Drupal 7 you can either :
– add this line to your setttings.php

 $conf['clean_url'] = 0 ; 

– or run in your phpmyadmin or mysql console the query

UPDATE variable SET value= ‘s:1:”0″;’ WHERE name=’clean_url’;

(you may have to change the table name if you have defined a prefix during the installation).

Happy drupaling 🙂

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