Runcloud Force SSL TLS HTTP to HTTPS

Any new app on runcloud uses a combination of Apache and NGINX, don't ask me how I know this, it just works like that.

Normally we use
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

In the .htaccess.

Because runcloud have different config, we use

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]

A share would be, Sublime.

Hi, I'm Edwin

I'm a multilayer Marketer + Designer that helps businesses get more leads. My core skills are web design, SEO and Copywriting. I work at Web Design, Laman7
Malaysia Website Awards