我有一个站点,其区域需要强制 SSL 模式,然后强制为非 SSL。
我从以下规则开始:
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/tourism/bookings/(.*) https://%{SERVER_NAME}/tourism/bookings/$1 [R,L]
RewriteRule ^/?bookings/(.*) https://%{SERVER_NAME}/bookings/$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/bookings
RewriteCond %{REQUEST_URI} !^/tourism/bookings
RewriteRule (.*) http://%{SERVER_NAME}$1 [L,R,QSA]
</VirtualHost>
现在,上述工作 - 但 SSL 模式显然解释 /includes/* 以强制它为非 SSL ...是否对上述内容进行了调整以允许我强制除上述两个之外的所有内容(但任何依赖项,如JS/CSS 包括遵循当前协议)?
提前致谢