I have two routes in my asp.net mvc app
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{culture}/{controller}/{action}/{id}",
defaults: new { culture = CultureHelper.GetDefaultCulture(), controller = "Home", action = "Index", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default no language",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
When i enter url http://localhost/galleryin browser, i'm redirected to http://localhost/, when i try http://localhost/gallery/index, i'm geting 404 error
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /gallery/index
when i add any implemented language to url (http://localhost/en/gallery), app is working.
I'm new to routes and webapp programing, so i would appriciate if anyone could help me with this with detailed explanation how to fix this.