I noticed that some sites prevent modification of the slug in the URL. For exemple in stackoverflow if you change the slug of this post, when you load the page, the real slug comes back.
This is not Javascript, so I supposed it is managed by PHP. I do not see how to do it and I really can not find any answer on the web... Anyone know ?