Generic way to do it but would result into duplicate URLs, e.g. https://example.com & https://www.example.com 1RewriteCond %{HTTPS} off 2RewriteCond %{HTTP:X-Forwarded-Proto} !https 3RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] To avoid the duplicate URLs, do the following: 1## 1. Redirect all …
Read More1sudo yum install epel-release 2sudo yum install nginx 3sudo systemctl start nginx 4... 5... 6edit /etc/nginx/nginx.conf 78... 9... 10#add this line in bottom of 'server' block: 11Redirect 301 https://your_domain_here/$request_uri; 1213sudo systemctl restart nginx 14sudo systemctl enable nginx
Read Morehttps://www.rsreese.com/redirect-http-to-https-using-varnish/ https://varnish-cache.org/tips/vcl/redirect.html https://www.dmsp.de/system-administration/varnish-cache-vcl-301-redirect/
Read More