Can"t find it? Try searching the entire web with:

Google
 

Monday, November 19, 2007

Pretty Permalinks
Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to refer to your article (or section), or how you might send a link to your story in an e-mail message. Because others may link to your individual postings, the URL to that article shouldn't change. Permalinks are intended to be permanent (valid for a long time).

"Pretty" Permalinks is the idea that URLs are frequently visible to the people who click them, and should therefore be crafted in such a way that they make sense, and not be filled with incomprehensible parameters. The best Permalinks are "hackable," meaning a user might modify the link text in their browser to navigate to another section or listing of the weblog. For example, this is how the default Permalink to a story might look in a default WordPress installation:

/index.php?p=423

How is a user to know what "p" represents? Where did the number 423 come from?

In contrast, here is a well-structured, "Pretty" Permalink which could link to the same article, once the installation is configured to modify permalinks:

/archives/2003/05/23/my-cheese-sandwich/

One can easily guess that the Permalink includes the date of the posting, and the title, just by looking at the URL. One might also guess that hacking the URL to be /archives/2003/05/ would get a list of all the postings from May of 2003. Pretty (cool). For more information on possible Permalink patterns in WordPress, see Using Permalinks.

No comments: