【发布时间】:2016-05-03 19:45:52
【问题描述】:
我正在使用带有 HTTPS 的 Amazon ELB(ELB 将所有流量从 443 重定向到 80)并且一切正常。
现在我使用下一个 htaccess 代码将所有请求从 http 重定向到 https:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
RewriteCond $1 !^(index\.php|assets)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
它工作得很好,问题是 Amazon ELB 健康检查由于 http 到 https 重定向而失败,有没有办法将所有流量重定向到 https,除了一个 url?
(所以我可以在 http 上使用 URL 进行健康检查,而在 https 上使用其他所有内容)
【问题讨论】:
标签: .htaccess codeigniter amazon-web-services