Cloudflare 页面规则,仅在一页上使用 SSL

Cloudflare page rules, SSL on one page only

SSL 灵活已开启。 规则:

http://example.com/register - Always use https
https://example.com/* - Forwarding to http://example.com/

我尝试只在一个页面启用SSL,其余的应该是http。

因为页面规则在它们匹配的条目处停止并且不会继续(例如,如果规则匹配,它将不匹配下面的任何其他内容)你需要在"Always use HTTPS" 和 "downgrader" 中间,如下所示:

与其使用页面规则,不如在服务器端进行重定向可能更好。您可以使用 CloudFlare 将设置的 X-Forwarded-Proto header 来判断用户是使用 HTTP 还是 HTTPS