Answer the question
In order to leave comments, you need to log in
How to pass referrer to your own subdomain?
Hello!
Please tell me how you can transfer Referrer from your site.ru domain to demo.site.ru, and don't transfer anything for everything else?
Tried same-origin but didn't work. Is it possible to do this?
Answer the question
In order to leave comments, you need to log in
By means of a client script it is possible. For example, on the site.ru page, use Javascript to extract Referer from HTTP and, when accessing demo.site.ru, substitute it in another HTTP header, for example, in X-Referrer
var referrer = document.referrer;
$.ajax({ // jQuery
url: 'http://demo.site.ru/foo/bar',
headers: { 'X-Referrer': referrer }
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question