M
M
Mitya Kolesnikov2014-02-14 13:13:03
PHP
Mitya Kolesnikov, 2014-02-14 13:13:03

How to implement tracking of the source of the transition, which is the redirect?

I made a redirect at the domain registrar level for all subdomains of the site to the main page of another site. Those. http://*.site.ru leads to site.net
The final task is to put the site in GET on site.net using PHP. Those. I want to get the following result: http://*.site.ru -> site.net?uri=*.site.ru
HTTP_REFERER unfortunately does not accept such a redirect as a referral source. The question is what to do in my case? Are there alternative PHP tools that can detect such a moment? Or maybe you can use htaccess?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanatPHP, 2014-02-14
@mittus

The name registrar does not deal with redirects. The registrar can register aliases in the DNS so that all subdomains point to a single IP address.
If a redirect is made, then some web server does it. So it needs to be configured so that it adds a parameter to the address bar.

M
maxaon, 2014-02-14
@maxaon

By means of PHP - there is no reliable method. Use htaccess.
You can still redirect using JS, but this will increase the latency of opening the page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question