打开网址: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");
}