- Getting Started
- Basic Configuration
- Creating Multiple Sites On Your Local Computer
- Error Pages
- Accessing Your Test Site(s)
- Adding Modules and Themes
- Creating Content
- Custom Blocks
- Working with the Menu
- The Contact Form
- URL Aliases
- Moving Entire Drupal Site with Databases
- Moving Stuff to Your Web Site
- Setting Up Cron
- Additional Tips and Tricks
- Categories (Taxonomy)
- Common Problems
- Links and IMG
- Keeping Your Local and Remote Sites Synchronized
- More Reading
- Glossary
URL Aliases
Submitted by Nancy on Wed, 02/14/2007 - 13:58.
"URL" is an abbreviation of "Universal Resource Locater." It is a fancy way of saying "my page's address (or name) on the web." It is the "name" by which a browser identifies a page to display. We've all seen advertisements that say "Check us out at abcxyz.com." Well, abcxyz.com is a URL for the home page of their web siteA logically grouped set of content - also web site. (well, sort of - there is an implied add-on to that, such as index.html).
By default, DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. calls your content "nodes" and identifies them by their position in your databaseA collection of data related to an application.. So your page on "The History of the Macadamia Nut - Part 1" might be known as "node/167." That's all fine and well for DrupalDrupal
An open-source content management system that is used on this site and is taking over the world., because it understands that. But your visitor really doesn't care where the page is in the databaseA collection of data related to an application.; all they want to do is find the page again, or know what the entry in their bookmarks list is.
So DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. has a feature called "URL Alias" that allows you to provide a more understandable name to the content. As far as browsers, servers, and search engines go, it is totally unnecessary. But for humans, it is nearly mandatory. This is why I tell people to always turn on the Path core moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP., which supports URL Aliasing. (I will mention another moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. shortly, called Pathauto.)
So, just before you submit that exhaustive treatise on macadamia history, and if you have the Path moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. enabled (I told you that you'd want it), then you'll see a section on the edit page that says "URL path settings." So let's say you want your visitors to see it as http://www.mysite.com/MacadamiaHistory.htm. In the URL field, you enter MacadamiaHistory.htm.
Now, some people will argue that putting that ".htm" on the end is not necessary. That's absolutely true. But then it's not necessary to do any of this. My opinion is that if you want your visitors to see a "normal" name, it should look like a normal WEB name. Web pages have some kind of type, such as ".htm" so we should too. But it's your preference.
Oops, forgot to do this before you submitted the page? Not to worry - DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. to the rescue!
First, visit the page you created. In your browser's address field, you'll see its URL. On the end it will probably say "node/xxx" where xxx is some number. Write down that number. Now go to Administer>>Site building>>URL Aliases. There's an "Add Alias" tab at the top. In the top box (sorry, they seem to have dropped a label in 5.1), enter "node/xxx" from above. In the second box, enter "MacadamiaHistory.htm".
Now go back and visit that page and look at your browser's URL field.
If your siteA logically grouped set of content - also web site. is going to have lots of content, particularly user-submitted content, you might want to looks at the PathAuto module. Not only will this moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. automatically generate URL aliases for new content (according to rules you can set up), but can even go back and change aliases in bulk.



**.html
i do agree that for ease of use you should put ".htm" however you should also bring to lite that people using phpRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. could use ".phpRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML." and so on so forth like you pointed out not nessacary but then again non of it is...lol