Site Building

Hands-On: Automating URL Aliases for Drupal 7

Check your version

This tutorial covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Sprout Video

To get those handy human-readable URLs on our site, we are going to use the Pathauto module. As we discussed earlier, this relies on the Token module as well as the core Path module. The Pathauto settings are divided over two pages: one page to set up the actual replacement patterns, and another one to configure Pathauto’s general settings. These configuration pages can seem a bit intimidating at first. Luckily, most of the defaults are what most sites will want to use anyway, so that makes our job with configuration a lot simpler than it may first appear. In this lesson we'll configure some path patterns using tokens, and then get all of our existing content using the new patterns by using the bulk update feature of Pathauto.

Additional resources

Using Drupal, 2nd edition

Using Drupal source code

Drupalize.Me Guide: Using Drupal Book by O'Reilly Media