0
Q:

how to redirect http to https

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
1
//PUT THIS IN .htaccess

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^gymstatistics\.altervista\.org [NC,OR]
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
RewriteRule ^ https://gymstatistics.altervista.org%{REQUEST_URI} [NE,R=301,L]
0
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
0
if ($_SERVER['HTTPS'] != "on") 
{
    $url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    header("Location: $url");
    exit;
}
0

New to Communities?

Join the community