change page url js code example
Example 1: window replace url
location.replace("url");
Example 2: javascript change url without reload
window.history.pushState('', 'New Page Title', '/new-url.php');
location.replace("url");
window.history.pushState('', 'New Page Title', '/new-url.php');