How to set query parameter in nodeJS on page, without reloading?

When you scroll through a thread on this forum, it will change the url: it adds the id of the specific post you’re looking at. For example from /35 to /36 etc.

See this video and look at the end of the url:

How can I achieve the same effect as this forum is using?
I tried to achieve the same by setting up url rewriting in the route panel: mypage/:id and then using the ‘Query Manager’ component to set the query parameter. But the result when using this is:
mypage/6?id=7

Community Page
Last updated: