?
Solved

Referring URL

Posted on 2013-05-15
3
Medium Priority
?
400 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1400 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 600 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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 this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

766 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