views:

50

answers:

1

I want to enable .htaccess files on my server in order to use "clean_url" functionality in Drupal.

This is what I've done so far:

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
cd /etc/apache2/mods-enabled
grep mod_rewrite *

In phpinfo() results I can see: mod_rewrite, so I guess the module is enabled.

I've added a htaccess file with the following content:

<IfModule mod_rewrite.c>
  RewriteEngine on

  RewriteBase /path/to/website

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

But still it says me my server doesn't provide such functionality. What am I missing ?

A: 

Be sure to check the configuration for your server or VirtualHost to ensure AllowOverrides is set to All. If it isn't, nothing in your .htaccess will be read or acted upon.

Mark Trapp