The short answer is quite simple , google “History js” , the real answer is never alter the address bar url IF you are going to provide different content from what anyone would get by entering the url you are changing to. When I mean that all content should be the same , I mean ALL content (including meta tags , and everything). Otherwise is like mocking your visitor (if anyone don't care about his / her visitors luckily search engines do)
Give an example of what you want and why you wish to do so. This could be meaningless. Would these changes be bookmarkable, and if so would they provide specific content different to the original, if you entered the new url manually?