I'd like to create a site where each user has his own home page and where the URL is in the format site\username
. How can I accomplish this with ASP.NET MVC routing system?
I'm planning the follow URL layout:
mysite/ -> home page
mysite/account/register -> account register page
mysite/user1 -> user1 home page
mysite/user2 -> user2 home page
The above URL would match the following controller\action
pattern:
mysite/ -> home/index
mysite/account/register -> account/register
mysite/user1 -> user/index
mysite/user2 -> user/index
How can I arrange my RegisterRoutes to solve this problem?