Forçar HTTPS amb PHP o htaccess.
Si el vostre lloc utilitza el certificat SSL, aprendre a ficar-se més en l'únic lloc amb https:// o file usant PHP. Htaccess
Com utilitzar PHP:
<?php if ( $_SERVER [ 'SERVER_PORT' ] != '443' ) { header( 'Location: https://' . $_SERVER [ 'HTTP_HOST' ]. $_SERVER [ 'REQUEST_URI' ]); exit (); } ?> Com utilitzar htaccess (recomanat).:
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https: //www.seudominio.com.br/$1 [R,L] .htaccess , force https , forçar https , forçar ssl Categories: Hosting , la programació , la Seguretat . htaccess , la força https , obligant a https , ssl la força
