Force https on a web page using htaccess
RewriteEngine on RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} <IfModule mod_headers.c> # Remove "includeSubDomains" if you don't want to enforce HSTS on all subdomains Header always set Strict-Transport-Security "max-age=31536000;includeSubDomains" </IfModule>