• Resolved hlwinkler

    (@hlwinkler)


    Hello,

    I am using W3TC (happily installed the hotfix this morning) and I have one issue, which is that I want to turn on https on my checkout page but I always get mixed ssl warnings because of images and css/js being loaded with http from MaxCDN. I would actually like to entirely exclude my checkout area from being handled by W3TC at all. Is this possible, or alternately is it at least possible to have certain pages not make use of the CDN? I’d prefer not to also set up my cert with MaxCDN because it adds complexity to my admin task and incurs another yearly cost (and I’m also not sure that the certificate I purchased will work with other domain suffixes).

    I accidentally also asked this here outside of this subforum, please feel free to delete my earlier post: https://www.ads-software.com/support/topic/plugin-w3-total-cache-how-to-exclude-some-pages-from-cdncaching

    Thank you for any assistance!

    https://www.ads-software.com/extend/plugins/w3-total-cache/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter hlwinkler

    (@hlwinkler)

    Any way to do this?

    Thread Starter hlwinkler

    (@hlwinkler)

    Would it be possible for the developer or someone else in the know to confirm that this is or isn’t possible?

    Thread Starter hlwinkler

    (@hlwinkler)

    OK, I guess not. I did my own digging and there is an array in wp-content/plugins/w3-total-cache/lib/W3/Plugin/Cdn.php called auto_reject_uri:

    $auto_reject_uri = array(
    ‘wp-login’,
    ‘wp-register’
    );

    it looks for strings in the URL rather than a fixed path to a resource. So, for example, in my case I can prevent my WooCommerce cart/checkout/account paths from using CDN by adding the following to it:

    $auto_reject_uri = array(
    ‘wp-login’,
    ‘wp-register’,
    ‘checkout’,
    ‘cart’,
    ‘my-account’
    );

    There doesn’t seem to be any kind of input anywhere which will add items to this array and the excluded files list doesn’t work for URLs, so it would be really great to have this as an enhancement.

    A couple thoughts:

    On the “Page Cache” settings page, there’s an option to “Cache SSL (https) requests” which can be turned off.

    Further down on that page is an option to “Never cache the following pages:”, which you can enter and save. This way you can avoid hacking the core, which is just going to get overridden when you upgrade.

    Thread Starter hlwinkler

    (@hlwinkler)

    Hi,

    Thanks for the suggestion. I don’t think page caching is related to the CDN functionality. The first thing I tried was adding the pages to the “never cache” list but it had no effect. I’m aware that I’ll need to hack in this patch with every upgrade.

    hlwinkler,

    I had the same trouble. You fixed it adding the pages to the array right ?

    Thread Starter hlwinkler

    (@hlwinkler)

    Yup, it worked like a charm and is saving me $39 a month in CDN dedicated SSL costs. It would be a great feature for Frederick to add in a future update so it isn’t necessary to hack in after every update.

    Thanks for the reply. I did the same and it works like a charm.

    By the way, I wanted to do it for WooCommerce too :).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to exclude some pages from CDN/Caching’ is closed to new replies.