首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

掩藏网站后缀名.aspx[没什么实际意义]

2012-12-20 
隐藏网站后缀名.aspx[没什么实际意义]首先添加全局应用程序Global.asax??? protected void Application_Be

隐藏网站后缀名.aspx[没什么实际意义]

首先添加全局应用程序Global.asax

??? protected void Application_BeginRequest(Object sender, EventArgs e)
??? {
??????? string rawUrl = Request.RawUrl;
??????? rawUrl = rawUrl.Replace("html", "aspx");
??????? Context.RewritePath(rawUrl);
??? }

?

浏览器输入http://localhost:1981/UrlRewritingTest/Default.html 实际跳转到Default.aspx

热点排行