Forcing the domain to serve securely using HTTPS (for any site)
Goto Public directory to paste this code inside .htaccess RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] Header alway
Updated Sep 29, 2026 ยท ๐ 2 views
Goto Public directory to paste this code inside .htaccess
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"