我新建了一个ASP.NET MVC站点,首页是http://localhost/home/index,如何设置选项达到直接访问http://localhost/就可以了?
1 回答

慕码人2483693
TA贡献1860条经验 获得超9个赞
放到routing规则的最后
routes.MapRoute(
"网站首页",
"{*values}",
new { controller = "Home", action = "index"}
);
- 1 回答
- 0 关注
- 413 浏览
添加回答
举报
0/150
提交
取消