Drupal: enabling mod_rewrite module for Clean URLs

hi, i have installed drupal and want to enable the cleanurls in my localhost site, than accoding to given documentation /etc/apache2/httpd.conf file must be edited and than followed, but when i have opend the httpd.conf file it is completely empty so tried out different expermients like adding the lines required in httpd.conf but failed. but while seaching for solution one of comments posted by zaugnutts it works for both ubuntu and debian.


1)enable rewrite module on apache.
a2enmod rewrite
(to disable type a2dismod rewrite)

2)Set directory permission.
You must find the file that sets permission of each directory for apache. In my case it was /etc/apache2/sites-enabled/000-default
edit the page so that the directory that you will be using to serve webpages has “AllowOverride All”. My file contains the following:

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

3)Just restart apache and it should be working:
/etc/init.d/apache2 restart

This entry was posted in Drupal. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s