runcloud-letsencrypt icon indicating copy to clipboard operation
runcloud-letsencrypt copied to clipboard

How to auto-redirect non-ssl to ssl?

Open nezam05 opened this issue 6 years ago • 3 comments

Hi, after rcssl installed certs, how to auto-redirect non-ssl traffic to ssl version?

nezam05 avatar Nov 30 '18 05:11 nezam05

If you on wordpress use Really Simple SSL plugin and activate

UltraInstict avatar Dec 06 '18 20:12 UltraInstict

If you on wordpress use Really Simple SSL plugin and activate

Thanks for your reply. I think there should be a solution at server level so that it works for all kinds of app

nezam05 avatar Dec 07 '18 04:12 nezam05

If you're using hybrid apache/nginx, add these lines to your .htaccess

RewriteCond %{HTTP:X-Forwarded-Proto} !=https
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]

lesaff avatar Mar 29 '19 19:03 lesaff