I am trying to write a PHP or Drupal code in Block. If the session is equal to IN or US then it should be redirected to the taxonomy term URL.
PHP - I tried to redirect using header(Location: ""). It is not working for internal URL(internal Website URL). For Example : listing/taxonomy/term/22 . However, I can redirect it to google.com .
Java Script - I have tried to redirect it using Java Script. I am able to redirect. But the page is loading continuously. It has not loaded completely even after 10 minutes.
Once the page is redirected, if I click on any other link say menu link it is still going to the listing/taxonomy/term/22 link or not allowing me to select different link after redirecting.
I want to redirect to listing/taxonomy/term/22 page, when the home page is selected or accessed and once it is redirected I should be able to select other pages(internal nodes by selecting buttons say menu).
To Sum up, I need a code, which will help me to:
1. Redirect to the listing/taxonomy/term/22 internal node page.
2. Once it is redirected, I should be able to choose any other link by clicking on them.