Add this rout to your routes in global.asax.cs
file
routes.MapRoute(
"RouteName", // Route name
"FixedUrlSegment/{UserName}/{Controller}/{action}/{id}/", // URL with parameters
new { controller = "ControllerName",
action = "ActionName",
id=UrlParameter.Optional
},
);
I think you should use a fixed segment as start-up point for your route to distinguish it from default or other routes
of course in log in action method you must redirect to that new route
return RedirectToRoutePermanent("RouteName", new { username = "UserName",
action = "Index",
controller = "Home",
id="userId"
}
);
// remember id is not required for that route as mentioned in global file
this example will redirect your page to url
www.appname.com/FixedUrlSegment/loggedusername/home/index/loggeduserid