Enabling Clean URLs for Drupal in Ubuntu 14.04 LTS

×

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 569 of /homepages/46/d762693627/htdocs/dc/includes/menu.inc).
Enabling Clean URLs for Drupal in Ubuntu 14.04 LTS

In the newer versions of Ubuntu, the Apache config has changed just enough to make me re-do a bunch of stuff when setting up a new Drupal install. Here is the way I was able to enable Clean URLs from a base Ubuntu 14.04 LTS LAMP install:

  • Enable mod_rewrite for Apache
    # a2enmod rewrite
  • Add AllowOverride within the default website configuration
    # vi /etc/apache2/sites-available/000-default.conf

    Add just under DocumentRoot /var/www/html

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

    Make sure .htaccess is in the default web directory!
    # ls /var/www/html/.htaccess
    If nothing shows after using the above command, download Drupal again and copy the .htaccess file to that directory

blog tag: