测试的url地址是http://www.gkxsn.com/testweb/default.aspx?id=1, 结果如下:Request.ApplicationPath: /testwebRequest.CurrentExecutionFilePath: /testweb/default.aspxRequest.FilePath: /testweb/default.aspxRequest.Path: /testweb/default.aspxRequest.PathInfo:Request.PhysicalApplicationPath: E:\WWW\testweb\Request.PhysicalPath: E:\WWW\testweb\default.aspxRequest.RawUrl: /testweb/default.aspx?id=1Request.Url.AbsolutePath: /testweb/default.aspxRequest.Url.AbsoluteUri: http://www.gkxsn.com/testweb/default.aspx?id=1Request.Url.Host: www.gkxsn.comRequest.Url.LocalPath: /testweb/default.aspxResponse.Write("<b>Request.ApplicationPath:</b> " + Request.ApplicationPath + "<br>");Response.Write("<b>Request.CurrentExecutionFilePath:</b> " + Request.CurrentExecutionFilePath + "<br>");Response.Write("<b>Request.FilePath:</b> " + Request.FilePath + "<br>");Response.Write("<b>Request.Path:</b> " + Request.Path + "<br>");Response.Write("<b>Request.PathInfo:</b> " + Request.PathInfo + "<br>");Response.Write("<b>Request.PhysicalApplicationPath:</b> " + Request.PhysicalApplicationPath + "<br>");Response.Write("<b>Request.PhysicalPath:</b> " + Request.PhysicalPath + "<br>");Response.Write("<b>Request.RawUrl:</b> " + Request.RawUrl + "<br>");Response.Write("<b>Request.Url.AbsolutePath:</b> " + Request.Url.AbsolutePath + "<br>");Response.Write("<b>Request.Url.AbsoluteUri:</b> " + Request.Url.AbsoluteUri + "<br>");Response.Write("<b>Request.Url.Host:</b> " + Request.Url.Host + "<br>");Response.Write("<b>Request.Url.LocalPath:</b> " + Request.Url.LocalPath + "<br>");
转载于:https://www.cnblogs.com/_zjl/archive/2011/03/19/1988615.html