//虚拟目录的路径
Response.Write("<strong>Request.ApplicationPath:</strong>" + Request.ApplicationPath + "</br>");
//站点的物理路径(完整路径)
Response.Write("<strong>Request.PhysicalPath:</strong>" + Request.PhysicalPath + "</br>");
//站点物理路径的目录
Response.Write("<strong>DirectoryName:</strong>" + System.IO.Path.GetDirectoryName(Request.PhysicalPath) + "</br>");
//站点物理路径的目录
Response.Write("<strong>Request.PhysicalApplicationPath:</strong>" + Request.PhysicalApplicationPath + "</br>");
//当前页面的文件名
Response.Write("<strong>FileName:</strong>" + System.IO.Path.GetFileName(Request.PhysicalPath) + "</br>");
//当前页面的虚拟路径
Response.Write("<strong>Request.CurrentExecutionFilePath:</strong>" + Request.CurrentExecutionFilePath + "</br>");
//当前页面的虚拟路径
Response.Write("<strong>Request.FilePath:</strong>" + Request.FilePath + "</br>");
Response.Write("<strong>Request.Path:</strong>" + Request.Path + "</br>");
//原始URL
Response.Write("<strong>Request.RawUrl:</strong>" + Request.RawUrl + "</br>");
//绝对路径(不包括参数什么的)
Response.Write("<strong>Request.Url.AbsolutePath:</strong>" + Request.Url.AbsolutePath + "</br>");
//绝对URL
Response.Write("<strong>Request.Url.AbsoluteUri:</strong>" + Request.Url.AbsoluteUri + "</br>");
//URL协议方案
Response.Write("<strong>Request.Url.Scheme:</strong>" + Request.Url.Scheme + "</br>");
//URL的主机名
Response.Write("<strong>Request.Url.Host:</strong>" + Request.Url.Host + "</br>");
//URL端口号
Response.Write("<strong>Request.Url.Port:</strong>" + Request.Url.Port + "</br>");
//主机名+端口号
Response.Write("<strong>Request.Url.Authority:</strong>" + Request.Url.Authority + "</br>");
//获取文件名的本地操作系统表现形式
Response.Write("<strong>Request.Url.LocalPath:</strong>" + Request.Url.LocalPath + "</br>");
//附加路径信息,例如http://wjnhome.com:88/UrlDemo.aspx/Hello?id=22#top 那么这里就是Hello
Response.Write("<strong>Request.PathInfo:</strong>" + Request.PathInfo + "</br>");
//URL的路径和GET参数
Response.Write("<strong>Request.Url.PathAndQuery:</strong>" + Request.Url.PathAndQuery + "</br>");
//URL的GET参数
Response.Write("<strong>Request.Url.Query:</strong>" + Request.Url.Query + "</br>");
//主要指的是http://wjnhome.com:88/UrlDemo.aspx/Hello?id=22#top中#后面的top。
//但一般情况下无法获取值,因为浏览器不会把这个值发送到服务器端
Response.Write("<strong>Request.Url.Fragment:</strong>" + Request.Url.Fragment + "</br>");
//主机名
Response.Write("<strong>Request.Url.DnsSafeHost:</strong>" + Request.Url.DnsSafeHost + "</br>");
//URL的全部
Response.Write("<strong>Request.Url.OriginalString:</strong>" + Request.Url.OriginalString + "</br>");
//这种情况 Uri uriAddress = new Uri ("http://user:password@www.contoso.com/index.htm ") Console.WriteLine(uriAddress.UserInfo);
Response.Write("<strong>Request.Url.UserInfo:</strong>" + Request.Url.UserInfo + "</br>");
//从某个页面跳转过来的时候会显示源页面的值
Response.Write("<strong>Request.UrlReferrer:</strong>" + Request.UrlReferrer + "</br>");
//URI的每一段
for (var i = 0; i < Request.Url.Segments.Length;i++ )
{
Response.Write("<strong>Request.Url.Segment" + i + ":</strong>" + Request.Url.Segments[i] + "</br>");
}

URL 地址解析的更多相关文章

  1. Google 地图切片URL地址解析

    一.Google地图切片的投影方式及瓦片索引机制 1.地图投影 Google地图采用的是Web墨卡托投影(如下图),为了方便忽略了两极变形较大的地区,把世界地图做成了一个边长等于赤道周长的正方形(赤道 ...

  2. HTML URL地址解析

    通过JavaScript的location对象,可获取URL中的协议.主机名.端口.锚点.查询参数等信息. 示例 URL:http://www.akmsg.com/WebDemo/URLParsing ...

  3. URL地址解析

    URL的一般格式为(带方括号[]的为可选项): protocol :// hostname[:port] / path /[?query]#fragment   1.protocol :// 为传输协 ...

  4. Node.js中的URL

    Node.js中的URL 什么是URL URL是Uniform Location Resource的缩写,翻译为"统一资源定位符",也就是描述资源位置的固定表示方法.被URL描述的 ...

  5. Node.js的url模块简介

    什么是URL URL是Uniform Location Resource的缩写,翻译为“统一资源定位符”,也就是描述资源位置的固定表示方法.被URL描述的资源可以位于互联网上,也可以位于本地. URL ...

  6. Onthink学习随笔

    -------------------------------------(写代码不孤独_小小代) 用Onthink写了一个网站暂时还没上线功能略显不全没,完全没有发挥出应有的强大拓展之处,各种地方略 ...

  7. Nodejs 学习

    1,Node.js REPL交互式解释器:nodejs安装完毕后,打开终端,进入到nodejs的安装目录下,输入node,进入到新的页面,该页面称为Node.js REPL (交互式解释器):可以简单 ...

  8. 【Yii系列】Yii2.0基础框架

    缘起 因为一个月的短暂停留,我在给朋友搞事情,所以Yii系列的文章耽搁了很长时间,现在又重拾当时的知识,给大伙好好撸下这一系列的博客 提起Yii,虽然是国外的开发者搞的,但是它的作者是华人,这才是让我 ...

  9. Thinkphp中的A 函数(Thinkphp3.2.3版本)

    A函数是TP中实例化控制器的一个快捷函数,它的语法结构如下: A('模块/控制器') //当控制器层名称不是 Controller 时须这样写 A('模块/控制器','控制器层名称') 如果要调用的控 ...

随机推荐

  1. Slim Span POJ 3522 (最小差值生成树)

    题意: 最小生成树找出来最小的边权值总和使得n个顶点都连在一起.那么这找出来的边权值中的最大权值和最小权值之差就是本题的结果 但是题目要求让这个输出的结果最小,也就是差值最小.那么这就不是最小生成树了 ...

  2. tju3243 Blocked Road

    There are N seaside villages on X island, numbered from 1 to N. N roads are built to connect all of ...

  3. PowerShell随笔9--- call

    很多时候我们需要在一个脚本文件执行另外一个脚本文件,比如我们有一个Test.ps1文件 我们有以下2种方法: Invoke-Expression (&) 我们可以看到,Test.ps1中的代码 ...

  4. ArcGIS处理栅格数据(一)

    一.建立影像金字塔 ArcToolbox--数据管理工具--栅格--栅格属性--构建金字塔(pyramid) 说明:该方式一次只能为一张影像数据建立影像金字塔. ArcToolbox--数据管理工具- ...

  5. docker的网络-单主机(三种原生网络)none、host、bridge

    docker的网络分为:单主机.跨主机 这篇先说:单主机 我们先说一下docker的原生网络模式 网络模式 简介 优点 使用场景 none 空网络,没有网络 此网络与外界隔离,安全度非常高 适合公司内 ...

  6. 牛客网多校第5场 I vcd 【树状数组+离散化处理】【非原创】

    题目:戳这里 学习博客:戳这里 作者:阿狸是狐狸啦 n个点,一个点集S是好的,当且仅当对于他的每个子集T,存在一个右边无限延长的矩形,使的这个矩形包含了T,但是和S-T没有交集. 求有多少个这种集合. ...

  7. Sentry & React

    Sentry & React https://docs.sentry.io/platforms/javascript/guides/react/ https://docs.sentry.io/ ...

  8. TypeScript Interface vs Types All In One

    TypeScript Interface vs Types All In One TypeScript https://www.typescriptlang.org/docs/handbook/adv ...

  9. ES6 arrow function vs ES5 function

    ES6 arrow function vs ES5 function ES6 arrow function 与 ES5 function 区别 this refs xgqfrms 2012-2020 ...

  10. css text-align-last & text-align

    css text-align-last & text-align css https://caniuse.com/mdn-css_properties_text-align-last http ...