How do i change a base url with js

Viewed 32

i want to change a base url example: current url: bread.web.app - change: house.com with javascript without redirect to house.com. i use firebase as hosting.

i got this code:

window.history.pushState({}, 'house', 'http://house.com'); 

and this:

 document.write("<base href='https://house.com" + document.location.host + "' />");

this codes work in some way but dosent work the way i want.

0 Answers
Related