How correctly to rewrite domain to a subfolder with HTTPS ?
This will just redirect all request to subfolder1
RewriteCond %{HTTP_HOST} ^(www.)?example1.com$
RewriteRule !^subfolder1/ subfolder1%{REQUEST_URI} [L]
If I change to
RewriteCond %{HTTP_HOST} ^(www.)?example1.com$
RewriteRule !^subfolder1/ https://subfolder1%{REQUEST_URI} [L]
then it will generate a loop
The problem is if I navigate to this url: example.com , then I want it to redirect to HTTPS, and to not change the url to something like: example.com/subfolder1
I want to make the above to work with HTTPS.