I have a website with my front controller in a subdirectory. Then I would like to transparently redirect root folder of the site to subdirectory. Moreover, I have SSL enabled and want to force it for the site.
I succeeded in transparently redirecting root folder to subdirectory by doing this in .htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ web/$1 [QSA,L]
</IfModule>
So I decided to add https to the RewriteRule
like this : RewriteRule ^(.*)$ https://my-domain-name.com/web/$1 [QSA,L]
. But I don't get what I want. In fact, I get https forcing but the transparent root folder to subdirectory redirection does not work anymore. I got in my address bar : https://my-domain-name.com/web
though my wish is to have https://my-domain-name.com
.