ajamil
answered Feb 16 '22 00:00
.htaccess code will be like to force http request to https is belowed
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
RewriteCond %{HTTPS} off
will check is current request is without ssl than
redirect to same url to https version of the url
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]