【发布时间】:2012-01-20 15:18:26
【问题描述】:
我想强制ssl 访问整个网站,但以下页面除外:
www.example.com/loans_and_lines/home_loans.html www.example.com/cardswww.example.com/cards/international-ministries.htmlwww.example.com/cards/international-ministries/donation-3.htmlwww.example.com/locations_and_contacts/
强制ssl:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/personal/loans_and_lines/home_loans\.html
RewriteCond %{REQUEST_URI} !^/cards/$
RewriteCond %{REQUEST_URI} !^/cards/international\-ministries\.html
RewriteCond %{REQUEST_URI} !^/cards/international\-ministries/donation\-3\.html
RewriteCond %{REQUEST_URI} !^/locations_and_contacts/$
RewriteRule (.*) https://www.example.com$1 [R=301,L]
但是,/cards 或 /locations_and_contacts 以及任何页面都不会被排除在ssl 访问权限之外。谁能告诉我我的规则有什么问题?
【问题讨论】:
标签: linux apache mod-rewrite ssl