打开网址:http://xxxx.com自动跳转==》http://xxx.com/home/index
设置route入口:
routes.MapRoute( name: "Main", url: "", defaults: new { controller = "Home", action = "Main", id = UrlParameter.Optional } );
添加Main
public ActionResult Main() { return Redirect("/Home/Index"); }
时间: 2024-10-13 16:41:07