In case you are using Cloudflare service, follow Cloudfare support to force
your site to https
https://support.cloudflare.com/hc/en-us/articles/200170536-How-do-I-redirect-all-visitors-to-HTTPS-SSL
Make sure to replace example.com with the domain name you're trying force to https
Code Block |
---|
| actionscript3 |
---|
| actionscript3 |
---|
|
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
|
On server config section add following lines
Code Block |
---|
| actionscript3 |
---|
| actionscript3 |
---|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
example
Code Block |
---|
| actionscript3 |
---|
| actionscript3 |
---|
|
server {
listen 80;
server_name signup.mysite.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
|