I have encountered a problem with routing. I need to create this kind of route:
http://www.site.com/index.html?parameter
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.Ignore("{resource}.css/{*pathInfo}");
routes.Ignore("{folder}/{*pathInfo}", new { folder = "Styles" });
routes.Ignore("{resource}.js/{*pathInfo}");
routes.MapPageRoute(
"Default",
"{page}.html",
"~/default.aspx"
);
}
}
I have successfully created this route:
http://www.site.com/index.html/?parameter
How do I remove the ‘/'(slash) from the URL?
Remove the slash from after html so it becomes the following:
Hopefully this helps