在Global.asax文件中添加
protected void Application_BeginRequest(Object sender, EventArgs e)
{
if (Context.Request.FilePath == "/") Context.RewritePath("index.html");
}
在访问www.test.com时有index.html就是index.html,没有时就自动路由规则去了
在Global.asax文件中添加
protected void Application_BeginRequest(Object sender, EventArgs e)
{
if (Context.Request.FilePath == "/") Context.RewritePath("index.html");
}
在访问www.test.com时有index.html就是index.html,没有时就自动路由规则去了
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。