日期:2014-05-17 浏览次数:21359 次
首先添加全局应用程序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