URLs again

Kimbro Staken <[email protected]> Fri, 14 Nov 2003 23:28:53 -0700
Newsgroups gmane.comp.web.syncato.general
Message-ID <[email protected]>
I just commited another change to the default URL scheme. Having to 
deal with unique titles was going to be very problematic so I added the 
post ID as part of the URL. Even just looking at the few hundred posts 
in my site I already have a fair amount of title duplication.

Fortunately I was able to do this is a way that allows pure title URLs 
to still work if you do happen to have unique titles. That won't be 
super reliable as you add more content, but can help out if you need 
it.

The URLs now look something like this.

http://host/WK/blog/893_title_of_post.item

Though this will also work if "title of post" is unique.

http://host/WK/blog/title_of_post.item

The other problem with the title scheme is that changing the title on a 
post changes its URL. When the id is included that's all that is used 
to find the post.

For pages it may or not be a good idea to use the title, but the option 
exists.

One other point to make about this is that these are just alternative 
ways of accessing an item. The true identity of the item is to use just 
the ID in the URL as was originally done. i.e. http://host/WK/blog/893

Kimbro Staken
Software, Consulting and Writing http://www.xmldatabases.org/
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl