<script type="text/javascript">
// Redirección HTTP a HTTPS mejorada
(function() {
'use strict';
// Verificar si estamos en HTTP
if (location.protocol === 'http:') {
// Construir URL HTTPS
var httpsUrl = 'https:' + window.location.href.substring(5);
// Redirigir usando replace para no crear historial
window.location.replace(httpsUrl);
}
// Opcional: Forzar HTTPS en todos los enlaces
AJS.$(document).ready(function() {
AJS.$('a[href^="http://"]').each(function() {
var $this = AJS.$(this);
var href = $this.attr('href');
if (href.indexOf('http://') === 0) {
$this.attr('href', href.replace('http://', 'https://'));
}
});
});
})();
</script> |