Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 HTTPS 证书,我不会将其限制在一个文件夹 /xcart/ 中,但我不想从其他文件夹和页面访问。是否可以使用 .htaccess 进行此限制?
谢谢
RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/xcart/.* RewriteRule (.*) http://%{HTTP_HOST}/$1 [R,L] RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/xcart/.* RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L]