My current URL is: www.example.com/category/we-developer/
However, if any user mistakenly adds extra characters after the /
, for example, www.example.com/category/we-developer/fgggfgg
, it should take him to a 404
page. But instead, the user is again viewing the previous page (www.example.com/category/we-developer/
)
This is why Google is showing it as a duplicate page. What I wish is that instead of opening the same page, the user would be taken to a '404` page.
Can you advise on how to do this? Note that my site is using CodeIgniter.