码迷,mamicode.com
首页 > 其他好文 > 详细

IIS 设置默认首页静态页,无静态页,走路由

时间:2016-11-11 14:43:36      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:dex   protect   oba   html   com   prot   默认   iis   request   

在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,没有时就自动路由规则去了

IIS 设置默认首页静态页,无静态页,走路由

标签:dex   protect   oba   html   com   prot   默认   iis   request   

原文地址:http://www.cnblogs.com/94cool/p/6053755.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!