CyberPanel Community

ClosedEnsure all HTTP requests are redirected to HTTPS

Pa
Paolo #1

Hi guys, I’ve been asked to ensure that all HTTP requests are redirected to HTTPS.

Can you pinpoint the right direction and how can I either check or fix that?

Thank you so much for your help

2 replies
Pa
Paolo #2

I tried to place this code under REWRITE rules for my website but still http urls are not redirected to HTTPS

rewriteCond %{HTTPS} !on
rewriteCond %{HTTP:X-Forwarded-Proto} !https
rewriteRule ˆ(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

Sign in to reply