In Javascript or jQuery, I need to be able to replace the domain section of the url only without the page reloading. The domain can vary so I can't hard code something in.
For example, I need to change these;
https://domainone.co.uk/page/id/extra-info
https://domaintwo.co.uk/page/id/extra-info
To
https://mynewdomain.co.uk/page/id/extra-info