I am working on a website in which many users can create their account and have a personalized page. I wish to provide them a twitter like url to access their pages, for example http://www.mysite.com/smith or http://www.mysite.com/john . I am using asp.net mvc 1.0. I have an understand that i can add routes to the global.asax file, but i am not able to figure out how to add a route that will work for such urls.
Please provide some help / suggestions. Thanks.
Well, you can always add this as a last route:
but this will make your app more cumbersome. Specifically, you’ll have to check usernames so that they don’t collide with the rest of your routes (like
/info, ‘/admin’ etc.).What I recommend is to move personalization page one level deeper: