Mod rewrite / clean urls for Drupal on Ubuntu Apache Server

Just spent the last few days trying to get clean urls to work on my Ubuntu apache2 server, and finally found a thread on a Drupal forum. It turned out that you have to activate mod rewrite in Apache before any of the settings in the .htaccess file will take place. Also need to remember to modify /etc/apache2/sites-availabe/default to AllowOverride All in the server settings for your domain. Once this is done, then this command gets Apache doings its mod rewrite thing:

sudo a2enmod rewrite

Simple as that. Restart or reload Apache, and now mod rewrite / clean URLs will work on your Ubuntu Drupal CMS installation.

One Comment on “Mod rewrite / clean urls for Drupal on Ubuntu Apache Server”

Leave a Reply

Your email address will not be published. Required fields are marked *