0
我有一個站點需要強制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模式顯然解釋/包括/ *用它強制非SSL ...有一個調整以上允許我強制除了上面兩個之外的所有內容(但是任何依賴項,如JS/CSS包括遵循當前協議)?
在此先感謝
萬分感謝,您的建議排除工作100%。 –