我想重定向所有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