Mobile app version of vmapp.org
Login or Join
Yeniel560

: Redirect users refered from a specific site I have a portfolio website that I have created with wordpress theme X, that is featured on two websites that showcase examples made with theme X.

@Yeniel560

Posted in: #Htaccess #Redirects

I have a portfolio website that I have created with wordpress theme X, that is featured on two websites that showcase examples made with theme X.

I am in the process of making a new portfolio website, based on my own wordpress theme, but I would like to keep the old website on a subdomain for the visitors that are refered from the showcase websites.

Is it possible to only redirect visitors that come from those specific sites to the subdomain (old.portfoliowebsite.com)?

Is there any way to do this (other than asking the showcase websites to change the link)?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Yeniel560

1 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas447

One way that comes to my mind would involve using PHP:

$_SERVER['HTTP_REFERER']


You could check for the refering URL and implement a redirect accordingly:

if($_SERVER['HTTP_REFERER']=="http://www.example.com/") {
my_redirection_fuction();
}


This is however a rather unreliable method since people can hide the refering url through browser privacy setting.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme