title: ASP.NET MVC 3 FormsAuthentication ReturnURL
body: <p>I am using Forms Authentication in my MVC 3 app and having a problem with my return URL.</p>
  
  <p>When I mark an action <code>&lt;Authorize&gt;</code> on the Home controller, it redirects to the login page and works, but the return URL is then <code>/</code>, so when it redirects, it is redirecting to the root of the the current URL <code>Authorize</code>.</p>
  
  <p>So the URL's are like this:</p>
  
  <p><a href="http://localhost/" rel="nofollow">http://localhost/</a> - Controller = Home - Action = Index</p>
  
  <p><a href="http://localhost/Authentication/LogOn" rel="nofollow">http://localhost/Authentication/LogOn</a></p>
  
  <p>I end up with this: <a href="http://localhost/Authentication/LogOn?ReturnURL=~%2F" rel="nofollow">http://localhost/Authentication/LogOn?ReturnURL=~%2F</a>, I need to get back to <a href="http://localhost/" rel="nofollow">http://localhost/</a></p>
  
  <p>Help!! :)</p>