Request的RawUrl属性,和其它获取url信息的各种方法比较
2008-06-18 16:44
RawUrl 属性
属性值
当前请求的原始 URL。
备注
原始 URL 定义为 URL 中域信息之后的部分。在 URL 字符串 http://www.contoso.com/articles/recent.aspx 中,原始 URL 为/articles/recent.aspx。原始 URL 包括查询字符串(如果存在)。
测试的url地址是http://www.test.com/testweb/default.aspx?id=1, 结果如下:
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PathInfo:
Request.PhysicalApplicationPath: E:/WWW/testweb/
Request.PhysicalPath: E:/WWW/testweb/default.aspx
Request.RawUrl: /testweb/default.aspx?id=1
Request.Url.AbsolutePath: /testweb/default.aspx
Request.Url.AbsoluteUri: http://www.test.com/testweb/default.aspx?id=1
Request.Url.Host: www.test.com
Request.Url.LocalPath: /testweb/default.aspx
|