• 🤗 This support section is delivered by the community, by other users of the software. Support in this section is not delivered by Chevereto Staff, remarks and issues in this section should be always taken with the appropriate context and care, with a grain of salt.

[SSL-Guide] https via .htaccess

Avast

đź‘˝ Chevereto Freak
This tutorial describes, how to use https (SSL) via .htaccess. (I prefer the solution via v-hosts, but if you don't have access to it you have to use .htaccess)

There are 3 solutions for https via .htaccess

1.) Insert this two lines to your .htaccess-file:
Code:
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

2.) If you want to bind it at the ssl-port:
Code:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

3.) To redirect all http-requests to https use this:
Code:
RewriteCond %{SERVER_PORT} ^80$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
 

tomsit

Cheese
Moderator
Community Staff
Beta tester
Big Chevereto
How to redirect to HTTPS using .htaccess behind Nginx Proxy

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