Forcing HTTPS with PHP or. Htaccess
If your site uses SSL certificate, learn how to pry open the site only with https:// or file using PHP. Htaccess
How do using PHP:
<?php if ( $_SERVER [ 'SERVER_PORT' ] != '443' ) { header( 'Location: https://' . $_SERVER [ 'HTTP_HOST' ]. $_SERVER [ 'REQUEST_URI' ]); exit (); } ?> How to using. Htaccess file (recommended):
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 , Programming , Security . htaccess , force https , forcing https , ssl force
