我已在.htaccess文件中设置将每个URL重定向到https。
我要添加的内容是将其排除在特定的子目录之外
例如:www.mysite.com/myfiles <-不要强制使用https 例如:www.mysite.com/everythingelse <-强制使用https
到目前为止,我的.htaccess:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>