Press "Enter" to skip to content

Drupal Permalinks: Path, Pathauto and Token Modules

Setting up SEO-friendly Permalinks in Drupal is fairly straightforward:
1) Check “Clean URLs” setting under Administer->Site Configuration. Enable it, if not already enabled.

1a) If the option to enable is disabled (grayed out), then you may need to modify your webserver settings (check Drupal site for info), or edit your .htaccess file in your installation directory. If your installation directory is the same as where the domain is mapped to, then add/uncomment the line as shown here:
RewriteBase /

But if your Drupal installation directory is different, say, “myweb” located under the domain directory, then the line should look like:
RewriteBase /myweb

Editing the .htaccess file was sufficient in my installation. In fact, this may be the only option if you have a shared hosting plan.

2) The next step is to download/enable some modules. The “path” module should be available by default, if not you need to download it. In my case, I had to download only the modules “pathauto” and “token,” and enable “path” along with these two.

That is pretty much it. Any new post you create will have “Automatic alias” selected by default, and you can deselect it for that post if you wish. If you leave it selected, the URL for the post will be a Permalink.

If you had posted any content before you installed/enabled the above modules, you may need to edit and save all your existing contents for the paths to get converted to the Permalink versions. This is what I had to do. Fortunately, I only had a few posts that were created before I enabled Permalinks, so it wasn’t a big deal. For all you know, they may be a better (more automated) way to update all your existing nodes paths to Permalinks. You can check the Drupal site to see if there is.

  • Print
  • Digg
  • StumbleUpon
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Add to favorites
  • email
  • Google Buzz
  • MySpace
  • RSS
  • Slashdot
  • Technorati
  • LinkedIn

Be First to Comment

Leave a Reply