The URL for questions on SO have a format like:
https://stackoverflow.com/questions/123456/description-from-title-of-question
which I already know is done using MVC routing, and which I am doing myself.
When you go to the same URL, but without the friendly bit at the end:
https://stackoverflow.com/questions/123456
then StackOverflow adds the friendly bit for you, and you end up with the same address in your browser address bar:
https://stackoverflow.com/questions/123456/description-from-title-of-question
My question is, how does SO do this? Does it involve going to the database, getting the title description and redirecting to the route that includes the title on the end (Creating a new request)? Or is there something in MVC routing which handles this? Or is it being added client side via javascript or something?
I'd also be interested to hear other peoples opinions on good ways of doing this, as well as how SO do it.