var old = document.location + '';

// replace just the domain...(preserve path)
// var newloc = old.replace(/^http:\/\/[^\/]+\//,"http://www.nuphedrine.com/");

// replace entire path up to last slash with new domain path
// var newloc = old.replace(/^http:\/\/.*\//,"http://www.nuphedrine.com/");

// replace with new loc and query args.
var newloc = "http://www.nuphedrine.com/" + document.location.search;

document.location.replace(newloc);
// alert(old + '\n' + newloc);

