When the Cloudflare CDN [converts requests from HTTPS to HTTP](https://f5.com/glossary/ssl-offloading), it passes the original scheme in the **CF-Visitor** header, _not_ **X-Forwarded-Proto** as specified in [The FAQ](https://developers.openshift.com/faq/troubleshooting.html#_how_do_i_redirect_traffic_to_https) To redirect requests that were originally HTTP to HTTPS, the rewrite rules need to be: ``` RewriteCond %{HTTP:CF-Visitor} !https RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] ``` This works for [FOLDOC](http://foldoc.org/). The same presumably applies for JBoss #449.
When the Cloudflare CDN converts requests from HTTPS to HTTP, it passes the original scheme in the CF-Visitor header, not X-Forwarded-Proto as specified in The FAQ
To redirect requests that were originally HTTP to HTTPS, the rewrite rules need to be:
This works for FOLDOC.
The same presumably applies for JBoss #449.