title: How to allow access only to logged in users restricting direct entry of url?
body: <p>in a Rubyonrails application i want only  logged in users to enterinto the inner pages?
  how can i redirect the direct entered urls to index page?</p>
  
  <p>in php if(!isset($_SESSION[id]) { header("location:index.php") }, how this can be implemented in ruby on rails</p>