Solved

Referring URL

Posted on 2013-05-15
3
388 Views
Last Modified: 2013-05-15
What is the difference between Request.Url and Request.UrlReferrer  and Request.ServerVariables("HTTP_REFERER")?

I'm trying to set the referring url

And is there a dirrerence if they arrive from a hyperlink?
0
Comment
Question by:lrbrister
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 350 total points
ID: 39168171
I think Request.UrlReferrer picks up the HTTP_REFERER variable. request.URL is the CURRENT url whereas request.UrlReferrer is the PREVIOUS url.
0
 
LVL 44

Assisted Solution

by:Rainer Jeschor
Rainer Jeschor earned 150 total points
ID: 39168178
Hi,
Request.Url is the current requested URL.
Request.UrlReferer and Request.ServerVariables("HTTP_REFERER") should be identical and are the url from where the current request has been initiated (e.g. Page A has a link to Page B then the referer on the Page B load will be Page A).
But you cannot rely on this information as proxies and firewalls can be configured to deny sending this information hence the values will be NULL.

Good explanation:
http://www.kruegerwebdesign.com/blog/request-urlreferrer-is-null-what-gives

And the property is read-only therefore you cannot set it in code.

HTH
Rainer
0
 

Author Closing Comment

by:lrbrister
ID: 39168198
Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question