Request.Url和ReferrerUrl

Mah*_* KP 0 c# url

假设我们的网站收到了谷歌搜索结果的请求.在那种情况下,当我采取HttpContext.Current.Request.Url.ToString()HttpContext.Current.Request.UrlReferrer.ToString()时,应该是什么结果.

ash*_*jay 7

我认为会HttpContext.Current.Request.Url.ToString()返回您实际网站的网址

HttpContext.Current.Request.UrlReferrer.ToString()
Run Code Online (Sandbox Code Playgroud)

返回,the previous request that linked to the current URL. 以便您获得谷歌搜索结果的请求,如果它的第一个请求和下一个是您的网页...

我觉得......