Assuming a C# development environment
Global.asax:
routes.MapRoute(
"Bookmarks",
"bookmarks",
new { controller = "Bookmarks", action = "Bookmarks"}
);
routes.MapRoute(
"Bookmark",
"bookmark/{bookmarkid}",
new { controller = "Bookmarks", action = "Bookmark" }
);
BookmarksController:
public ActionResult Bookmarks()
{
//Get all bookmarks, I presume. :)
return View();
}
public ActionResult Bookmark(string bookmarkid)
{
//Do stuff with the bookmark id
return View();
}
Using this routing scheme, http://localhost/bookmarks will hit the Bookmarks action in the Bookmarks controller, and http://localhost/bookmark/123456 will hit the Bookmark action in the Bookmarks controller.