if (window.location.href.endsWith("pt")) { window.location.href = window.location.href + "/index.html"; } else { document.write(""); }