Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Wiki > Spotlight: Pathauto - Pg. 194

Spotlight: Pathauto In Chapter 2, you learned about the Drupal path and how to use clean URLs. One reason to use clean URLs is so that they don't look so ugly. (To review, clean URLs remove the "?q=" from the URL.) That helps, but still leaves the URLs lacking a bit. Having a URL with "node/123" in it doesn't really tell either humans or search engines much about the page itself. Isn't it much better to instead have a URL with something like "about-us" in it? That is going to be much more memorable for a person, and the addition of pertinent keywords in the URL makes for better search engine optimization. So, even without clean URLs, you can still benefit from good pathnames. We'll quickly review the core Path module that we mentioned in Chapter 2. When enabled, it will add a new fieldset to the node creation/editing form called "URL path settings," as shown in Figure 5-9. When you expand that fieldset, you will have a field in which to enter an alternative name for that node's path (called a path alias). The name that you enter here will be used in place of the Drupal path, the part of the URL that comes after http://example.com/ (or http://example.com/?q= if you don't have clean URLs enabled).