title: How to redirect to the requested URI after authentication using Zend_Auth?
body: <p>I am using a simple <a href="http://framework.zend.com/manual/en/zend.auth.html" rel="noreferrer">Zend_Auth</a> setup to authenticate users for one of my applications, using a check in the preDispatch() method in a <a href="http://framework.zend.com/manual/en/zend.controller.plugins.html" rel="noreferrer">controller plugin</a>. When anonymous users navigate to </p>
  
  <pre><code>/users/view/id/6
  </code></pre>
  
  <p>for example, they should be redirected to the above URI after authentication.</p>
  
  <p>What is the best way to do this? I'd prefer not to store <code>$_SERVER['REQUEST_URI']</code> in the session. Personally, I'd find storing the entire Zend Request object to cleanest solution, but I am not sure if this is sensible and if this is the approach I should be taking.</p>
  
  <p>Any thoughts?</p>