Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request.Url and ReferrerUrl

Tags:

c#

url

Suppose our site has got a request from a google search result. In that case when i am taking HttpContext.Current.Request.Url.ToString() and HttpContext.Current.Request.UrlReferrer.ToString(), what should be the result.

like image 495
Mahesh KP Avatar asked Feb 23 '26 14:02

Mahesh KP


1 Answers

i think HttpContext.Current.Request.Url.ToString() returns your actual website's url

HttpContext.Current.Request.UrlReferrer.ToString()

returns the previous request that linked to the current URL. so you got request from a google search result if its first request and next is your webpage...

that wat i think...

like image 58
asharajay Avatar answered Feb 26 '26 03:02

asharajay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!