Eduardo
Eduardo

Reputation: 1831

Detect Domain redirection from another domain

I have to redirect a domain example.com to a specific url otherdomain.com/test.

Usually what I would do is to host example.com on a server and add a redirect with PHP or .htaccess to otherdomain.com/test.

Right now example.com is already redirected from godaddy to otherdomain.com, so it is not hosted anywhere.

I was wondering if it was possible to detect on otherdomain.com that a redirect was being done from example.com. I have tried:

$_SERVER['HTTP_REFERER']

This does not work because $_SERVER['HTTP_REFERER'] gets populated when user clicks a link, I tried anyways.

Remember example.com is not hosted anywhere, it is being redirected automatically to otherdomain.com from godaddy domain manager.

Maybe is there a way to detect the redirect on PHP or htaccess?

Upvotes: 0

Views: 230

Answers (1)

Mohamed Baddi
Mohamed Baddi

Reputation: 13

You can use google analytics service by adding tracking script into otherdomain.com

Upvotes: 1

Related Questions