Author: you've been HAACKED | Posted on: 2/22/2010 1:59:14 AM | Views : 986

During the MVP summit, an attendee asked me for some help with a common scenario common among those building content management systems. He wanted his site to use human friendly URLs. http://example.com/pages/ a-page-about-nothing / instead of http://example.com/pages/ 123 / Notice how the first URL is descriptive whereas the second is not. The first URL contains a URL "slug" while the second one contains the ID for the content, typically associated with the ID in the database. This is easy enough to set up with routing, but there's a slight twist. He still wanted the action method which would respond to the first URL to have the integer integer ID as the parameter, not the slug. Let's look at one possible approach to solving this. Here's an...(read more) ...

Go to the complete details ...