How can I set MapRoute from root to index.html file?
I would like to redirect http://localhost:61944/ to http://localhost:61944/index.html
I try:
routes.MapRoute(
name: "Root",
url: "index.html"
);
Inside the RegisterRoutes, but it returned 404 (Not Found).
Thanks
The ASP.NET route mapper can route to files or controllers.
Try this example: (you will need to rename your .html file to .aspx, but you don't have to make any other changes to it.)
In your route config file: