var redirect_host = "2site.com";
var current_location = window.location.toString();
var current_host = window.location.host.toString();
var redirect_location = current_location.replace(current_host, redirect_host);
window.location.href = redirect_location;