I have accountController class and its have login & home views.
[HandleError] public class accountController : Controller { [HttpPost] public ActionResult login(LoginModal model, string returnUrl) { //Authentication return RedirectToAction("home"); } public ActionResult home() { return View(); } } ------------------------------ ----------------------------- Global.asax have Route entry.. so my urls is http://lmenaria.com/login http://lmenaria.com/home routes.MapRoute(null, "home", new { controller = "account", action = "home" }); routes.MapRoute(null, "login", new { controller = "account", action = "login" });
When I tried the both URL on browser they are working fine. But when login success then its go to http://lmenaria.com/account/home So how can I remove "account" from this url. this is going when I used return RedirectToAction("home"); and getting 404 error.
So please let me know how can I resolved that issue. I don't need Controller Name in url.
Thanks Laxmilal Menaria