Community Documentation

Understanding Drupal paths

Last updated May 2, 2010. Created by highermath on September 19, 2005.
Edited by mlncn, jhodgdon, add1sun, LeeHunter. Log in to edit this page.

In Drupal terms, a path is the unique, last part of the URL for a specific function or piece of content. For instance, for a page whose full URL is http://example.com/?q=node/7, the path is node/7. If your site is using clean URLs, the full URL in this example would be http://example.com/node/7; the path would still be node/7. Because URL aliases can completely replace what visitors see as the URL, the paths discussed here (which are still how Drupal decides what content to show) are sometimes called internal paths.

Drupal paths are important because many configuration screens in the Drupal admin area use them. For instance, when you are adding a new item to a menu, you tell Drupal what page the menu item should point to by entering the path to the page.

Here are some examples of paths you might find in a Drupal site:

  • node/7
  • taxonomy/term/6
  • admin/content/comment
  • user/login
  • user/3

How to find Drupal paths

There are several ways to find the path to a particular page on your Drupal site. The first step is to find the URL of the page of interest:

  • If you know how to navigate to the page, you can go there and find the URL in your browser's URL bar.
  • You can also hover your mouse over a link to the page (such as in the Views administration screen or the content management screen at Administer >> Content management >> Content), and most browsers will show you the URL in the status section at the bottom of the browser window.
  • For Taxonomy term pages, you can find the URL in the Taxonomy administration page (at Administer >> Categories in Drupal 4.6 and 4.7, Administration >> Content Management >> Categories in Drupal 5, Administer >> Content Management >> Taxonomy in Drupal 6, or Administer >> Structure >> Taxonomy in Drupal 7). If you are viewing a list of terms for a particular vocabulary, each term should be a link to its taxonomy page. Hover over the link or follow the link to find its URL.

The URL you find could have several forms:

  • http://example.com/?q=[something] -- In this case, the [something] after ?q= is the path. For example, if the URL is http://example.com/?q=node/7, the path is node/7.
  • http://example.com/[something] or http://example.com/[your Drupal subdirectory]/[something] -- In this case, the [something] after the base path of your Drupal site is the path. For example, your URL could be http://example.com/node/7 or http://example.com/mysubdir/node/7; the path in either case is node/7.

Comments

duplicate content

How is duplicate content avoided?

Rule #43: Sloppy code has more bugs.

Global Redirect - Duplicate Content

This module should solve any duplicate content issues... Global Redirect

nobody click here