Saltar al contenido

Forzar SSL en el acceso al backoffice de Prestashop

Para forzar el Forzar en el acceso al backoffice de Prestashop la url SSL tan solo hay que acceder al fichero

/var/www/controllers/admin/AdminLoginController.php

y donde aparecen las siguientes líneas, descomentar 3 de las mismas

// You can uncomment these lines if you want to force https even from localhost and automatically redirect

// header(‘HTTP/1.1 301 Moved Permanently’);

// header(‘Location: ‘.Tools::getShopDomainSsl(true).$_SERVER[‘REQUEST_URI’]);

// exit();

quedando del siguiente modo

// You can uncomment these lines if you want to force https even from localhost and automatically redirect

header(‘HTTP/1.1 301 Moved Permanently’);

header(‘Location: ‘.Tools::getShopDomainSsl(true).$_SERVER[‘REQUEST_URI’]);

exit();

 

A partir de ahora cualquier acceso al backoffice se hará a traves de una url https.

 

FUENTE:https://www.prestashop.com/forums/topic/66744-force-backoffice-over-ssl/