heroheman
7/25/2012 - 9:00 AM

Javascript: Blog Redirection

Javascript: Blog Redirection

var protocol = window.location.protocol;
  	var host = window.location.host;
  	var path = window.location.pathname;
  	var newurl;
  	if (host=="blog.florenz.co.uk") {
  		host="www.florenz.co.uk";
  		newurl = protocol + "//"+ host + path;
  		window.location = newurl;
  	};