【发布时间】:2015-05-04 12:59:38
【问题描述】:
我希望能够始终在 https 中提供网站服务。我不是 apache 专家,但人们就是这样做的:
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
代码来自: https://serverfault.com/questions/570288/is-it-bad-to-redirect-http-to-https
有没有办法用 GCE 做到这一点?我只能在文档转发规则中看到,但对重定向一无所知。
谢谢
狮子座
【问题讨论】:
-
这些设置在负载均衡器后面的 Apache 服务器上不起作用。有没有办法从负载均衡器本身做到这一点?
标签: google-cloud-storage google-compute-engine