Path: readable URLs
The path module lets you create URL aliases for your Drupal pages. By default, Drupal automatically creates web address like www.example.com/?q=node/67, which many people feel are not user-friendly. Also search engines will give better rankings to pages that have more human-friendly URLs, especially if they include relevant keywords - for instance, www.example.com/?q=all-about-tarantulas.
And with Drupal's "clean URLs" feature you can get rid of the "?q=": www.example.com/all-about-tarantulas.
Some examples of URL aliases:
- user/login => login
- image/tid/16 => store
- taxonomy/term/7+19+20+21 => store/products/whirlygigs
- node/3 => contact
- node/10 => products/merchandise/cups
- node/10 => cups
- node/11 => products/merchandise/coffeemakers
You can create URLs as many levels deep in your virtual directory structure as you like. So, for example, suppose a page is called
www.example.com/taxonomy/term/7+19+20+21.
you could give it:
www.example.com/store/products/whirlygigs
Note that although it is possible to assign the same internal URL to multiple aliases, this is generally not a good idea if you care about your search engine rankings; Google for example penalises your site by dropping its rank if it thinks that you are publishing duplicate content under multiple URLs (a form of web spamming). So if you change your mind later on, and just HAVE to change a URL alias, for example from
www.example.com/dangerous/tarantulas
to
www.example.com/beautiful/tarantulas
you don't want to just delete the old URL, or that page will have to start from scratch building up page rankings. The best thing to do is to set up a "301 redirect" for the old URL; as with many things Drupal, there are several ways to do this and details are quite involved, so I'll leave that (and robots.txt files) for your research.
Another note along the same lines is that you should really enable the path module and assign aliases to your content from the very start, so you don't have to deal the consequences of search engines and external sites already linking to your pages via the /node/ URLs. Or, if you are converting a site over from another platform (blogging tool, standard HTML-CSS), create your aliases to match the URLs from the previous site and you'll carry all the search engine history right along to the new one.
Of course if you don't care about your search engine rankings, you can just ignore all this and just use the path module to give your visitors friendly-looking permanent links!
You enable the path module on the modules page (administer >> modules). Then when users with the right permissions create or edit posts, they'll see a field for "URL path settings." That's where they can enter an alias of their choice.
On the URL aliases page (administer >> url aliases) you'll see a list of all the URL aliases on your site. There you can edit them, and add new ones. You can assign more than one alias to a page (just use the add alias tab again for each new alias).
On the access control page (administer >> access control) you can decide who can create aliases and who can administer the list of them.
The path module also lets you define many URL aliases at once. This is useful if you wish to use URLs uniformly different from those assigned by default. For example, you may want to show your URLs in a different language. To do this sort of thing, you need to dig a bit into Drupal's source code.
You can
- set the path for a post with the path module.
- add a URL alias: administer >> url aliases >> add alias.
- administer the list of URL aliases: administer >> url aliases.
- read how to configure clean URLs for your webserver.
- enable Clean URLS to remove the =? at administer >> settings in the General settings area.
- automate URL alias creation by installing and using the pathauto module.

Problem with subdomain and path
While building my Drupal 6.x site, I installed Drupal into a sub folder and the custom paths worked as expected. After setting up a subdomain pointing to that folder, paths like http://subdomain.example.com/bla.htm still work, but paths like http://subdomain.example.com/blub/bla.htm won't work anymore. When using Firefox, I get the error message "The page isn't redirecting properly".
What am I doing wrong?
Update: I found the evildoer; it was the Permalink module.