0

I've already enabled mod-rewrite with

sudo a2enmod rewrite

I've added my Drupal7 install to the apache config file located in /etc/apache2/sites-available/default (note: Is this the correct config file to edit?)

<Directory "/var/www/myDrupal">
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Then I restarted Apache2 with

sudo /etc/init.d/apache2 restart

Yet it still fails the Clean URL test in Drupal. I've been banging my head against the keyboard for far too long. Anyone have any other suggestions?

HoldTheLine
  • 122
  • 3
  • 14
  • me answered here, http://stackoverflow.com/questions/12759103/the-clean-url-test-failed-in-drupal-7/19852719#19852719 – hahakubile Nov 08 '13 at 06:18

4 Answers4

1

If you have it residing in a "myDrupal" folder off the root, then it is in a sub directory. You need to edit .htaccess, and uncomment "RewriteBase /" on line 110.

Just change

# RewriteBase /

to

RewriteBase 

Then Flush your Drupal Cache and try again.

Collins
  • 1,069
  • 14
  • 35
  • 1
    Thanks for the tip: this was exactly the point on _Ubuntu 13.10 Server 64bit_ after I've installed **drupal7** package and enabled the _mod-rewrite_ on Apache2. This must be flagged as the correct answer by the way. – Julian Xhokaxhiu Mar 19 '14 at 14:56
0

If your .htaccess looks good, and the apache config file is set correctly with AllowOverride All, try navigating to clean-urls configuration page by yourSite.com/admin/config/search/clean-urls and enable it! Clean URL's test sometimes fails even though your server is properly configured to rewrite.

Good luck!

HoldTheLine
  • 122
  • 3
  • 14
0

You need to enable mod_rewrite. You'll have to cause the following to happen during instance createion:

a2enmod rewrite

service apache2 restart

jblack
  • 93
  • 5
0

Enabling clean urls for Ubuntu 14.04

(1) Run the command a2enmod rewrite on your ubuntu (Command Line Interface) CLI to make sure rewrites are installed.

(2) vi /etc/apache2/apache2.conf

a. Under all the AllowOverride All

(3) In the .htaccess file under /var/www/ if that is your place of drupal installation make sure the Rewritebase / is uncommented and correct. If your drupal installation is **Rewritebase /var/www/drupa**l, then change it to that.

(4) Run command service apache2 restart on your ubuntu CLI and you should be good. * Optional - make sure your root

~Good Luck

Kojak
  • 1
  • 1