if(document.location.href.indexOf('http://www.rwth-aachen.de')==-1 && document.location.href.indexOf('https://www.rwth-aachen.de')==-1) { if (document.location.port != '') { document.location.replace(document.location.protocol + '//www.rwth-aachen.de:' + document.location.port + document.location.pathname + document.location.search + document.location.hash); } else { document.location.replace(document.location.protocol + '//www.rwth-aachen.de' + document.location.pathname + document.location.search + document.location.hash); } }