/* This JavaScript checks to see if the user is using a standard domain */ var d = new String(window.location.host); /* domain variable */ var p = new String(window.location.pathname); /* path variable */ var u = new String(window.location.href); /* complete url variable */ /* list all your approved domains below (don't forget your development servers) */ if ((u.indexOf("entreprisescanada.gc.ca") == -1) && (u.indexOf("napoleonbeta.ic.gc.ca") == -1) && (u.indexOf("napoleonback.ic.gc.ca") == -1) && (u.indexOf("localhost") == -1)) { u = u.replace(location.host,"entreprisescanada.gc.ca"); /* change url with new domain */ window.location.replace(u); }