Home

Suckerfish Menu

  • Books
  • Recent Posts
  • Video Tutorials
  • Links
  • Blog
    • Home
    • Contact
    • Login-Register

Books on Drupal

There are many books on Drupal based on a wide range of topics. I have a page devoted to Drupal books that are available for purchase. Help support the site by purchasing your next book through DrupalDude.com.

Today's popular content

  • Drupal 5 Overview - Build a website in 10 minutes (37)
  • Scheduling Posts using Drupal (23)
  • Clean URL's need .htaccess File (18)
  • Drupal Poormanscron Module (14)
  • Creating Roles in Drupal 5 (13)
more

Enabling Clean URLs in Drupal 5

Submitted by Drupal Dude on Sun, 07/12/2009 - 9:44pm
  • Administration
  • Drupal 5.x
  • Installation

Today I am going to show you how to enable clean URL's in Drupal. By enabling clean URLs, your Drupal website will become a lot more search engine friendly and the URL's in your browser will be easy to read.

So what do I mean by clean URLs? I'll pull it straight from Drupal's Handbook:

By default, Drupal passes path arguments to itself via its internally generated URLs. This results in URLs that look like the following: "http://www.example.com/?q=node/83." This can make URLs hard to read and it also stops many search engines, like Google, from indexing the pages with these URLs.

You can tell Drupal to use "clean URLs", eliminating the "?q=" in internal URLs. Note that this works only for Apache servers which have the LoadModule rewrite_module configured and mod_rewrite enabled in httpd.conf configuration file.

So how do you enable this feature? Well hopefully you have your site on an Apache server. Most Apache web-servers have a module installed called rewrite_module, as mentioned above. If you are on a Windows server, you might want to ask if you can switch to an apache server. I had to do this for one of my sites and it made everything easier.

Luckily, Drupal will run a test to see if this is enabled on your web-server. Just go to Site Configuration and click on the menu called Clean URLs. You will see that this option is grayed out. What you have to do next is run the clean URL test. The link for this is at the end of the paragraph on this page. Just click on the link and hopefully you will be brought back to this same page, but this time the Clean URLs Enabled button is selectable. If it is, just click on Save Configuration and you are done. No more ?q=xxx!
If you can't click on it because it is still grayed out, you need to call your server administrator.

Drupal has more information on this in there handbook if you are interested.

Bookmark/Search this post with:
  • Delicious Delicious
  • Digg Digg
  • StumbleUpon StumbleUpon
  • Technorati Technorati
  • Add new comment
  • Delicious Delicious
  • Digg Digg
  • StumbleUpon StumbleUpon
  • Technorati Technorati

Latest Twitter Posts

Twitter Updates

    follow me on Twitter

    Popular Video Tutorials

    • Drupal 5 Overview - Build a website in 10 minutes (17,666)
    • Scheduling Posts using Drupal (5,237)
    • Drupal Poormanscron Module (4,787)
    • Adding Content Types to Drupal 5 (4,784)
    • Changing the Length of Post That Shows on Front Page (4,743)
    • Taxonomy or Categories in Drupal (4,470)
    • Clean URL's need .htaccess File (4,167)
    • Comments in Drupal 5 (4,146)
    • Where to install Drupal 5 Modules (4,074)
    • Setting Up A Contact Form in Drupal 5 (3,814)

    Recent comments

    • This is brilliant. One issue
      12 hours 45 min ago
    • Wow Thanks
      1 day 12 min ago
    • Bases can be a waste of time
      1 day 4 hours ago
    • Interesting point
      1 day 13 hours ago
    • There are some very great
      1 day 14 hours ago
    • Superbe article, vraiment
      1 day 14 hours ago
    • 111
      1 day 14 hours ago
    • tickets
      2 days 14 hours ago
    • The good feature also about
      2 days 16 hours ago
    • Thanks for a great article
      2 days 19 hours ago
    more

    Search

    Navigation

    • Popular content
    • Recent posts

    Buy Me A Beer

    Categories

    General

    • Administration (15)
    • Concepts (3)
    • Installation (4)
    • News (2)

    Drupal Version

    • Drupal 5.x (30)
    • Drupal 6.x (7)

    Modules

    • Comments (1)
    • Contact List (1)
    • Fuzzy Search (1)
    • Meta Tags (1)
    • Node Clone (1)
    • Node Words (1)
    • Path (1)
    • Pathauto (1)
    • Poormanscron (1)
    • Scheduler (1)
    • Search 404 (1)
    • Statistics (1)
    • Taxonomy (Category) (2)
    Powered by Drupal, an open source content management system
    Drupal is a registered trademark of Dries Buytaert. "Drupal Dude" is not affilliated with Drupal.org or the Drupal Association
    RoopleTheme