Solved

How To Check The Previous WeBsite URL You Came From

Posted on 2016-09-28
7
76 Views
Last Modified: 2016-10-17
Hi

I have two Websites
Website A
WebSite B

I want to make sure that all visitors on Site B are coming from Website A.

How i can accomplish this in ASP.net

Thanks
0
Comment
Question by:Kamal Khaleefa
[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
7 Comments
 
LVL 25

Assisted Solution

by:Lee Savidge
Lee Savidge earned 100 total points (awarded by participants)
ID: 41819285
0
 
LVL 28

Accepted Solution

by:
Dr. Klahn earned 200 total points (awarded by participants)
ID: 41819286
  • Issue a referral URL on site A with a unique one-time referral code in the URI, e.g. http://siteb.domain.com?refer=xxxxxxx
  • Require visitors to site B have a valid referral field in the URI.
  • Let referral fields be valid for, say, five minutes.
  • When a referral is used, validate the referral, issue a local cookie to permit access if it is valid, and always empty the used referral table (see next).
  • Put used referral fields in a local table as "expired".
  • Then visitors to site B must come from site A and the referral can only be used once.

This is a workaround to the HTTP "referer" field, which (a) can be spoofed and (b) is unreliable because many browsers now strip it for privacy reasons.
1
 
LVL 58

Assisted Solution

by:Julian Hansen
Julian Hansen earned 100 total points (awarded by participants)
ID: 41819540
Remember this information can be spoofed so don't rely on this for any kind of access control.
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 100 total points (awarded by participants)
ID: 41819553
is unreliable because many browsers now strip it for privacy reasons.
I have to argue with that.  I use the 'HTTP_REFERER' daily in all browsers without a problem.  It may be blocked in 'In Private' browsing but not in regular use.
0
 
LVL 28

Expert Comment

by:Dr. Klahn
ID: 41819573
Dave, here is the background on that.  At my own site, on the average I see perhaps one referral logged for every 40 accesses to a .HTML file. And yet the accessors are going directly to the desired content, not to the home page, as evidenced again by the log.  This implies to me that they are being referred from somewhere, and yet there's no referral logged.

This article gives some illumination, as ...

According to the RFC 2616:

Clients SHOULD NOT include a Referrer header field in a (non-secure) HTTP request if the referral page was transferred with a secure protocol.

So blame it on the RFC.  Any site which uses HTTP by default, but gets referrals from sites using HTTPS by default, can expect, for the most part, nothing in the referral fields.  Most modern browsers comply with this, it appears, since I very, very seldom see referrals from Google or Bing -- and the few I do see appear to be from older browsers.

new-1.gif
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41819680
I'll have to check on that.  Most of the pages I was thinking of are HTTPS connections.  And come to think of it, where I thought 'we' should be getting 'referers' we aren't so maybe we'll have to change the links to 'https'.
0
 
LVL 28

Expert Comment

by:Dr. Klahn
ID: 41846326
EE email requested stale question closure.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

626 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