OpenCraft
Follow OC!
  • Home
  • About
  • Solutions
  • Portfolio
  • Clients
  • Blog
  • Contact

Enabling clean URLs for Drupal on a clean Ubuntu

Thu, 2007-12-06 12:31
Tags:
  • apache
  • coding
  • drupal
  • ubuntu
By: 
Karim Ratib

This article applies to Ubuntu with Apache 2, MySQL 5 and PHP 5 installed from the package manager.

When you start using Drupal on Ubuntu, one of the first things to do is to enable clean urls. That page will first ask you to run the clean URL test, which will show you if the underlying Apache infrastructure is ready for this or not. It it's ready, clicking the test link should bring you back to the same page, but with the radiobuttons enabled. Otherwise, you will get a "page not found" error.

On Ubuntu, the "page not found" error is indeed what you will get first! Here's how to fix this in 3 easy steps:

  1. Ensure that mod_rewrite is enabled for Apache 2:
     % sudo a2enmod rewrite
  2. Edit Apache 2 configuration to allow Drupal's .htaccess file to be used. In file /etc/apache2/sites-enabled/000-default, inside the tag Directory /var/www/, replace the line
    AllowOverride none
    with
    AllowOverride All
  3. Restart Apache 2:
    % sudo /etc/init.d/apache2 restart
  • kratib's blog

Comments

by Bundaberg Web Designer (not verified) | Wed, 2009-08-19 03:42

Thanks

Thanks
I'm a Fedora user and I was going around in circles looking for the AllowOverride config.

Our work

Sanabel
Sanabel

Sanabel requested a bilingual dynamic web portal to improve its...

Reuters Intranet

Reuters Business Direct team approached OpenCraft to propose an...

View our complete portfolio

Related posts

  • Apache MultiViews automatically appends file extensions
  • Beware PHP $_REQUEST!
  • Run webinject (nagios plugin) for drupal projects
  • Coloring 1pixelout flash player in audio module
  • How to associate default users with projects in 'Case Tracker' module?

More posts by this author

  • Reverse-translating a string back into English in Drupal
  • Who needs Google Spreadsheets: Use Sheetnode!
  • Code contribution: Views Bulk Operations (VBO)
  • The Automatic Resource Destructor pattern
  • Where in the world is open source?

OpenCraft

  • About
  • Team
  • Process
  • Community
  • Media Kit
  • Portfolio
  • Clients
  • Industries
    • Social economic development
    • Multimedia culture
  • Services
    • Drupal development
    • Information architecture
    • Open source software development
    • Social network engineering
  • Request quote
  • Contact
  • Search
Blog

Our profiles at:

Drupal Google
rss

Creative Commons License
search