I am having some troubles trying to get a route to work so far I have
routes.MapRoute("Stores","{s}",new { controller = "Stores", action = "Index", s = UrlParameter.Optional});
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
constraints: null,
namespaces: new[] { "NS.Web.Controllers" }
);
I am trying to browse to the controller via /stores/store-abc however I get a 404.
What am I doing wrong with my routes?
Any help would be really appreciated
Your route definition doesn’t match the url pattern that you are using:
And your
Storescontroller: