我有 /secure 页面,我需要将打开此页面的用户重定向到 https 协议。但所有其他人都应该只用http打开。我想用 .htaccess 做到这一点
RewriteEngine on
RewriteRule ^secure(.+?) https://site.com/secure$1 [L,R=301]
RewriteCond %{SERVER_PORT} ^443$
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
但是在安全页面上,我得到了循环转发。我怎样才能避免这个问题?