title: request not found error during post request
body: <p>I have form with the following action </p>
  
  <pre><code>&lt;form action="users/edit/profile/{{user._id}}" method="post"&gt;
  </code></pre>
  
  <p>route.js</p>
  
  <pre><code>router.post('/edit/profile/:id', controllers.updateUserProfile);
  </code></pre>
  
  <p>and in controller </p>
  
  <pre><code>updateUserProfile: function(req, res){
          User.findByIdAndUpdate(req.params.id, { $set: { username: req.body.username, email: req.body.email, first_name: req.body.first_name, last_name: req.body.last_name }}, function (err, user) {
              if (err) {
                console.log(err);
                res.render("editProfile", {user: req.body});
              }
              res.redirect("/users/me/");
            });
      },
  </code></pre>
  
  <p>but when I submit the form I am getting 404 error 
  <a href="https://i.stack.imgur.com/QQiwF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QQiwF.png" alt="Error image"></a></p>