My project has two versions of the website – American and International. This is not localization, language is same, only content changes. I have created subdomain for the US version and kept international version on main domain.
Now, I googled for solutions to redirect US users to US website by default and used Geo redirect plugin (http://wordpress.org/extend/plugins/geographical-redirect/).
Now the problem, this plugin redirects visitors from US everytime they attempt to open the international version. What I need to do is, user should be redirected to the US version on first visit, then through a referrer link I put on US website, visitor should be allowed to visit the international version and surf the website. But again, if user tries to open website directly, he should be redirected to the US version.
How do I do that?
you could do that by using a cookie .
On the first time that a US user logs in , you set a cookie
Then , you perform and IF check on every page access to see if said cookie was set (or a certain value)
If the cookie does not exists , they are redirected to the US site, If it exist , than you do a redirect to any other link .