I'm trying to do a site like http://example.com which goes to my SignIn action located at the Account controller. After signing in, I want to redirect to something like http://example.com/id where id is the user's ID.
I already have this code in my Global.asax.cs.
routes.MapRoute("Login2",
"{bg}/{controller}/{action}",
new { controller = "Account", action = "SignIn", bg = "" }
);
routes.MapRoute("Login",
"{controller}/{action}",
new { controller = "Account", action = "SignIn" }
);
routes.MapRoute("Default",
"{bg}/{controller}/{action}",
new { controller = "Home", action = "Index", bg = "" }
);
When I go to http://example.com/id and the user is not yet authenticated, the sign-in form is displayed and it goes to the page I want it to redirect after signing in. In the case of just going to http://example.com, I'm doing some server-side validation to know the user's id and it also does it job.
When I'm in http://example.com/id and I want to sign-up, there's a link which goes to http://example.com/id/account/signup. It actually goes to the sign-up page. But when I go to http://example.com and I tried to hover the sign-up link, the link becomes http://account/signup instead of http://example.com/account/signup.