title: Joomla 2.5 home page redirect issue
body: <p>I want to set <code>joomla</code> site to redirect visiting users to registration page if my <code>cookie</code> is not set.
  I've put below code in top of the (after imports) <code>template</code> <code>index.php</code> file.</p>
  
  <pre><code>if (empty($_COOKIE["abc"])){   
      $app = &amp;JFactory::getApplication();    
      $link = "index.php?option=com_users&amp;view=registration";
      $app-&gt;redirect($link);
     exit();
  }
  </code></pre>
  
  <p>URL is redirect but it is going in loop. so page not loading correctly. 
  This is fire bug screen shot 
  <img src="https://i.stack.imgur.com/amty0.png" alt="enter image description here"></p>
  
  <p>How to omit this loop ?
  Thanks.</p>