我试图在某些页面和目录上强制使用 ssl。但是我收到页面循环错误。这是我的 htaccess 文件:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} dashboard
RewriteRule ^(.*)$ https://www.example.com/dashboard/$1 [R,L]
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_FILENAME} get_started_lp.php$
RewriteCond %{REQUEST_FILENAME} get_started.php$
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
基本上是有人访问 get_stared_lp 或 get_started 或我想要 SSL 的仪表板。有什么建议吗?
最佳答案
没关系。它最终成为 Rackspace 如何处理他们的 SSL 的问题。了解更多信息: http://www.wreckedmagazine.com/jasonsmall/2010/09/14/force-ssl-on-a-rackspace-folder/
关于.htaccess - 使用 .htaccess 仅在某些页面上强制使用 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9986905/