how did you implement SSL Ofir, does wordpress know it’s in https (cfr. the wordpress’ is_ssl-function)?
if yes, AO should put the optimized files on HTTPS as well. if not, you could fill in the “cdn root url” as “https://99bitcoins.com”, which will force the URL to https even if WP thinks it’s in HTTP.
hope this helps,
frank
Hey Frank. I think WordPress knows it’s in https. This is from my functions.php:
function is_ssl() {
if ( isset($_SERVER['HTTPS']) ) {
if ( 'on' == strtolower($_SERVER['HTTPS']) )
return true;
if ( '1' == $_SERVER['HTTPS'] )
return true;
} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
return true;
}
return false;
}
Also, I’m already using a CDN, but even when I change the CDN to https://99bitcoins.com the CSS is still messed up.
OK, then can you describe what is messed up? Is the entire page unstyled, or is it partly unstyled? Do you see any errors in the browser’s console? Can you enable CSS optimization briefly for me to have a look?
frank
All the CSS seems to be broken. I have enabled it for now so you can take a look please let me know once you’ve finished so I can revert the site back to normal.
Thanks.
something is rewriting the URL’s to a HTTP CDN-url, e.g. http://2u5tln3jelbhvk43s2ar7hi1.wpengine.netdna-cdn.com/wp-content/cache/autoptimize/css/autoptimize_f92621940739779d18fada7afb4afc36.css
do you have a CDN-plugin that is intervening, or do you have a CDN-setting in AO?
frank
I have a CDN setting in AO since I’m hosted on WPE and it has a CDN included.
OK, can you change the setting to HTTPS? 🙂
If you mean to change it in AO settings then I just did but the layout still come out messed up. Is there any place else I need to change this ?
regarding AO: what is the “CDN base URL” you entered in AO?
regarding other places: it’s entirely possible you have other plugins that rewrite URL’s to a CDN, but that I can’t know, can I? 😉
frank
https://2u5tln3jelbhvk43s2ar7hi1.wpengine.netdna-cdn.com/
OK thanks for your help, I’ll try to check this from the server side as well. Perhaps something in WPEngine needs to be configured.
had a look, my browser tells me the problem now is
2u5tln3jelbhvk43s2ar7hi1.wpengine.netdna-cdn.com uses an invalid security certificate. The certificate is only valid for the following names: *.netdna-ssl.com, netdna-ssl.com
so either just remove the CDN-setting or log a ticket at WPEngine for this, AO can’t help you rectify this I’m afraid.
frank
Will do, thanks so much for your help!
Hello again frank.
I’ve set up everything on the server side and the CSS is rendered correctly.
However when the plugin is active I get an https error “this page includes other resources which are not secure”.
When the plugin is disabled everything works fine – any idea why this is happening ?
Can’t tell really, as AO isn’t currently activated?
frank
Hey Frank. Just activated AO again, any chance you can take a look ?
The https is broken only when the plugin is activated.