Last active
September 8, 2015 23:28
-
-
Save bhubbard/ca31c1dfbf10f14122fc to your computer and use it in GitHub Desktop.
CloudFlare SSL - Jetpack Possible Fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
https://jeremy.hu/cloudflare-flexible-ssl-wordpress/ | |
* https://wordpress.org/support/topic/similar-posts-httpsssl | |
* https://wordpress.org/support/topic/it-cant-connect-my-wordpress-on-openshiftcom-to-wordpresscom | |
* http://ttmm.io/tech/securing-xml-rpc-wordpress/ | |
* https://felicianotech.com/blog/running-wordpress-behind-an-sslhttps-terminating-proxy/ | |
* https://wordpress.org/support/topic/publicize-error-code-32700 | |
*/ | |
/** | |
* Set port to 443 | |
*/ | |
$_SERVER['SERVER_PORT'] = 443; | |
/** | |
* https://support.cloudflare.com/hc/en-us/articles/200170536-How-do-I-redirect-all-visitors-to-HTTPS-SSL- | |
*/ | |
/** | |
* Solve the redirect loop issue when redirecting all traffic to HTTPS in CloudFlare | |
* @see https://wordpress.org/plugins/cloudflare-flexible-ssl/ | |
* @see https://support.cloudflare.com/hc/en-us/articles/203487280--How-do-I-fix-the-infinite-redirect-loop-error-after-enabling-Flexible-SSL-with-WordPress- | |
*/ | |
if ( isset( $_SERVER['HTTP_CF_VISITOR'] ) && strpos( $_SERVER['HTTP_CF_VISITOR'], 'https' ) !== false ) { | |
$_SERVER['HTTPS'] = 'on'; | |
} | |
Force Photon to HTTPS | |
add_filter( 'jetpack_photon_reject_https', '__return_false' ); | |
http://jetpack.me/support/getting-started-with-jetpack/known-issues/ | |
Custom CSS and WP Engine | |
Custom CSS will not be applied to visits by search engine bots on WP Engine sites due to a rule on their server to prevent bots from loading dynamic content. This can impact users, for example, whose Custom CSS modifies the layout to meet Google’s mobile-friendly designation. To work around this issue, either contact WP Engine support asking to remove the “Redirect Bots” option or add the Custom CSS directly to your theme’s style.css. | |
CloudFlare’s Rocket Loader | |
CloudFlare’s Rocket Loader is currently not compatible with Jetpack Likes, Site Stats, and other Jetpack features using Javascript. You’ll consequently need to disable this feature in your CloudFlare settings. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment