Page 2 of 2

Re: How to force SSL for one domain?

Posted: Mon Jul 17, 2017 6:08 pm
by dkyadav008
thank you skurudo for the template solution.

Re: How to force SSL for one domain?

Posted: Tue Jul 18, 2017 12:31 pm
by skurudo
You're welcome! ;-)

Re: How to force SSL for one domain?

Posted: Sun Feb 02, 2020 1:55 pm
by Szektor
I believe a %{HTTPS} variable is missing on the system.

If I use the following (it works on any other server):

Code: Select all

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
Here it redirects even after it reaches https://anything

This would be useful for Vesta team.