2
votes

I'm using the following:

  • OSX 10.7 Lion
  • PHP Version 5.3.26
  • Drupal 7.23
  • Apache/2.2.24

I'm trying to get 'Clean URLs' to work, but no matter what I do, I always see this message: "Clean URLs cannot be enabled".

I have mod_rewrite loaded in Apache, it appears on the 'Loaded Modules' list when viewing phpinfo().

I have AllowOverride set to 'All' in my httpd.conf file, under both "Directory /" and "Directory /Library/WebServer/Documents". This seems to be allowing me to use .htaccess files just fine.

I have a .htaccess file in the root of the website I'm working on, and it is being used because if i put something invalid in there, I get an error in the browser.

Here is the contents of my .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

What am I doing wrong..? have I missed something..?

What else do I need to do to enable 'Clean URLs' in Drupal..?

Thanks!

1

1 Answers

0
votes

Are you using the default Drupal 7 htaccess file? https://github.com/drupal/drupal/blob/7.x/.htaccess

That could be it.

Otherwise you could take a look here https://www.drupal.org/node/566880