title: Why redirect method is not working when rendering ejs file in node.js?
body: <p>I am working on node.js can you tell why redirect method is not working? I 
    have a code in ejs file that call order(get method) route in app.js.</p>
  
  <p>Code under app.js:</p>
  
  <pre><code>app.get('/order', routes.auth,routes.order);
  </code></pre>
  
  <p>Code under index.js:</p>
  
  <pre><code>exports.auth = function (req, res, next) {
  if (req.session.authenticated) {
  next();
  } else {
  res.redirect('signin');
  }
  };
  </code></pre>
  
  <p>Why redirect method is not go to signin.ejs file?it is always shown 404 not 
    found message even signin page available.In express 3 version redirect method
    will support or not?can any one clarify this? 
    And also please tell me the difference between of render and redirect.</p>
  
  <p>Thanks &amp; Regards    </p>