• Hi,

    I have WPSC running in mod_rewrite mode with CloudFront set up as my CDN. Everything is working perfectly except my Soliloquy sliders. Soliloquy uses data-soliloquy-src=”” properties in the img tags to reference the banner images themselves, and it appears the WPSC rewrite rules in .htaccess aren’t catching these.

    Alas, I’m a mod_rewrite noob, can someone help me get these caching properly?

    You can look at https://soliloquywp.com/ and see the slider at the top of that page to see what I mean. Whatever caching plugin they are using on that site doesn’t have the same problem (you can see the data-soliloquy-src and data-soliloquy-src-mobile properties are getting properly rewritten to use their CDN.

    My site is https://www.paaslane.com, you can see the banners not being rewritten to the CDN in the slider.

    Thanks!

    https://www.ads-software.com/plugins/wp-super-cache/

Viewing 1 replies (of 1 total)
  • Thread Starter bgrubin

    (@bgrubin)

    I did some additional digging. It looks like an interaction between WordPress MU Domain Mapping, the CDN rewriting in WPSC, and Soliloquy (and probably other plugins).

    Soliloquy gets the various image src properties by using wp_get_attachment_image_src(). This call appears to return the original, un-mapped domain. So then, when the CDN URL rewriting occurs in WPSC, it’s looking for URLs to rewrite using the *mapped* domain. Since the URLs generated by Soliloquy are referring to the unmapped domain, it doesn’t see them, and they don’t get rewritten.

    I hacked the Soliloquy plugin code to manually strip out unmapped domain and replace it with the mapped domain, which has temporarily fixed the issue.

    My questions now are:
    (a) Is it possible to get WPSC to look for *two* domains to rewrite to CDN, so that this type of issue is easily handled in the future?
    (b) What is the right way for plugins to get domain-mapped image src URLs?

    I know this isn’t strictly just a WPSC issue, but since you are also the author of MU Domain Mapping I thought this was a reasonable place for the thread.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘WPSC not rewriting Soliloquy slider images’ is closed to new replies.