You can force your visitors to be redirected from HTTP to HTTP inserting following code in your .htaccess file:
RewriteEngine On RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
If you want to force also the redirect from www. to no-www., use instead following syntax:
RewriteEngine On RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
- 0 Users Found This Useful