将所有页面除外的所有页面都redirect到HTTP
我使用下面的重写规则将2个php页面redirect到https(以保护用户数据),但是每当我点击这些php页面上的任何链接时,它们都会使用https进行redirect,页面无法正确显示。 底部的规则是为了将任何其他页面redirect回http,但它们不起作用。 任何意见将不胜感激! RewriteEngine on RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/securepage1.php$ [NC] RewriteRule ^(.*)$ https://www.example.com$1 [L,R=301] RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/securepage2.php$ [NC] RewriteRule ^(.*)$ https://www.example.com$1 [L,R=301] RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/securepage1.php$ [NC] RewriteCond %{REQUEST_URI} !^/securepage2.php$ [NC] RewriteRule ^(.*)$ http://www.example.com$1 [L,R=301]