I am working on a blog. I have an issue where if i go to single post page then i get a URL something like: http://localhost/category/old-Richard-McClintock/4 where 4 is my post id and "old-Richard-McClintock" is my post name.
Now how would i know that a user changed the url from http://localhost/category/old-Richard-McClintock/4 to http://localhost/category/old-McClintock/4 ? I want to load the original url as i am getting data from post id so in both cases, it will grab the data.
StackOverflow is also reloading the page with original URL if we change the content part(question title) without changing question id from URL.
i am using Express with ejs.
Any help will be highly appreciated.
Thanks.