Https redirect for htaccess
Simplest way to redirect directly in htaccess
Sometimes you don’t have access to the server and have to do a redirect in a .htaccess
file.
RewriteEngine on
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]