我有个MVC项目,我配置了一个路由:
routes.MapRoute("HomeLanguagePage", "{Type}/Index.html",
new { controller = "Home", action = "Index", Type= UrlParameter.Optional});
routes.MapRoute(
"Default", // 路由名称
"{controller}/{action}/{Type}", // 带有参数的 URL
new { controller = "Home", action = "Index", Type= "Article" } // 参数默认值
);
访问:http://localhost:80/article 和 http://localhost:80/article/Index.html 能够获取显示页面
现在有个需求,就是我需要建立一些静态页面,有些页面需要根据这个路由去找对应的页面,
有些页面需要显示静态页面。访问路径也是http://localhost:80/article/XX.html
我建立了article文件夹,然后建立了一个ArticleInfo.html
访问http://localhost:80/article/ArticleInfo.html页面正常显示,但是此时访问http://localhost:80/article显示
服务器错误
不走路由了,请问有什么办法可以解决么?