我想重定向所有HTTPS URL中输入http重定向特定的URL(除了一个帐户/付款):问题尝试使用SSL
RewriteCond %{SERVER_PORT} =80
RewriteCond %{REQUEST_URI} account/payment$
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{SERVER_PORT} =443
RewriteCond %{REQUEST_URI} !account/payment$
RewriteRule (.*) http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule . index.php [L]
工作正常,但如果我要http://url/account/payment,它的重定向我http://url/index.php
谢谢
我认为`REQUEST_URI`需要`/`匹配:`/ account/payment $` – 2011-02-11 13:24:23