if(location.protocol == 'http:'){
	var new_url = location.href.replace('http','https');
	location.href = new_url;
}

if(location.href.indexOf('&amp;') > -1){
	var new_url2 = location.href.replace('&amp;','&');
	location.href = new_url2;
}

