I set routeConfig.cs as below
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "404-PageNotFound",
url: "{*url}",
defaults: new { controller = "Error", action = "PageNotFound" }
);
but still when I hit website url it navigate me to 404-page not found as I am not using any contoller name and action name in my url.Like www.this.com not www.this.com/Home.Index.It should reddirect me to Login page when I put url as www.this.com Any help please.