我遇到了路由问题。我需要创建这种路线:
http://www.site.com/index.html?参数
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"
);
}
}
我已经成功创建了这条路线:
http ://www.site.com/index.html/?parameter
如何从 URL 中删除“/”(斜杠)?