I am trying to replace the second instance only of of the '&' character or replace all instances of '&' after the first '&' in the URL www.website.com/--Inventory&vt=test%20&%20unit
so far I've been using:
var url = window.location.toString();
window.location = url.replace(/&/, '%26');
window.location.reload(false);
but that replaces all the '&' characters. any ideas are appreciated. thanks!