Updated: 2019-02-27
Nginx redirect all http to https. Add this server block to /etc/nginx/sites-available/your_site.com
server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; }
Restart/Reload Nginx.
sudo service nginx restart
Add this section of code to .htaccess
# Redirect http to https RewriteCond %{HTTP_HOST} ^termtools\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.termtools.com/$1 [R,L]
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" />
For a more detailed explanation: Check out these tutorials.
Redirect HTTP to HTTPS in Nginx Server Tools