I though that i had posted this proc months ago until i went looking for it and couldn’t find it. so here is the proc that i used to enable clean urls on drupal 7.17 on ubuntu desktop 12.04
Procedure – Enable clean URLs for Drupal 7 on Ubuntu Desktop 12_04 rev_1.doc
Date: 11/13/2012
Author: PJ McGhee
Email: PJMcGhee@hotmail.com
Intended Audience: Drupal admins
Purpose: To explain the steps needed to enable clean URLs in Drupal by enabling the rewrite_module component and changing the httpd.conf file of Apache2 to
Web References:
http://drupal.org/getting-started/clean-urls
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
Procedure:
- Navigate to the Configuration, Search and Metadata section of Drupal.
- Click Clean URLs.
- In Drupal 7 the test will be run automatically and will give the result right away.
- When the test fails take a good look at the links above for background on the issue.
- Then, on this particular install, since you are running a dedicated server, you can do this first.
- At the command line, type apache2ctl –M and hit enter.
- Look for rewrite_module (shared) you should not see it (that’s to be expected)
- Type a2enmod rewrite and hit enter.
- Type apachectl –M again, hit enter. Now you should see the module listed there.
- Go to etcapache2 and edit the httpd.conf file which should be empty.
- Add the lines:
<Directory /var/www/drupal/>
RewriteEngine on
RewriteBase /drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
- In this scenario, the directory structure shown is correct, but it should reflect where you actually have Drupal installed.
- Then type sudo /etc/init.d/force-reload and hit enter.
- Then type sudo /etc/init.d/apache2 restart and hit enter.
- Then test clean URLs in Drupal.
- You should now see a check box that will allow you to enable this feature.