Fake the referer

Having

Newbie
Joined
Aug 18, 2015
Messages
5
Reaction score
0
I have two websites let's call them website A and website B. I want to make it so that every hyperlink you click on website A goes through website B before going to the link, without changing the URL of that link.

For example
"google link (google.com) on website A" -> "website B" -> "google.com"

Is this possible?
 
You could use jQuery's click() event handler and bind it to your Google href links on Website A so that when someone click on any of them they are directed to website B first. A simple script on Website B can then parse the inbound traffic and redirect to Google if required.

Code:
$(document).ready(function(){
    $('a[href*="google"]').click(function(){
        // redirect to Website B here
    });
});
 
Back
Top