Solved

Referring URL

Posted on 2013-05-15
3
386 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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 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