我正在使用带有htaccess的bolt-cms将URL的根目录重定向到/ public文件夹。现在,我需要将http重定向到https。如何连接这两个规则?
这是我的htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=301]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC,QSA]
RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.mecanalisis.com.ar%{REQUEST_URI} [L,NE,R=301]