10th September 2012, 20:27
#2
1 out of 1 members found this post helpful.
Cod:
<script type='text/javascript'>
var blog = document.location.hostname;
var slug = document.location.pathname;
var ctld = blog.substr(blog.lastIndexOf("."));
if (ctld != ".es") {
var ncr = "http://" + blog.substr(0, blog.indexOf("."));
ncr += ".blogspot.es/ncr" + slug;
window.location.replace(ncr);
}
</script>
Introdu codul asta inainte de </head> si oricine va intra, indiferent din ce tara, va fi redirectionat catre domeniul cu .es