WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Autoptimize] https issue

[Plugin: Autoptimize] https issue

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi!

    If WordPress is configured to use HTTPS, the plugin will make CSS and HTML urls using HTTPS. But if only some part is in HTTPS, you will need to hack “autoptimize.php” around line 19, where it says

    define(‘AUTOPTIMIZE_CACHE_URL’,WP_CONTENT_URL.’/cache/autoptimize/’);

    You might want to replace it with something like this:

    if($_SERVER[‘https’] == 1 || $_SERVER[‘https’] == ‘on’ || $_SERVER[‘SERVER_PORT’] == 443) {
    define(‘AUTOPTIMIZE_CACHE_URL’,’https://mysiteurl.com/wp-content/cache/autoptimize/’);
    }else{
    define(‘AUTOPTIMIZE_CACHE_URL’,WP_CONTENT_URL.’/cache/autoptimize/’);
    }

    It’s based on this code -> http://wordpress.org/support/topic/264510?replies=1

    Also, to do that modification you’ll need Autoptimize 0.9 that I’ll release later on today, or tomorrow. Check the version here: http://wordpress.org/extend/plugins/autoptimize/

    Emilio

    Jen Baumann
    Member

    @dreamwhisper

    Thanks for getting back to me and sorry for the late reply. I will give this a shot when I get back from vacation and let you know how it works.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Autoptimize] https issue’ is closed to new replies.