that’s weird …
some questions:
* did you clear W3 Total Cache (and any other page cache you might have)?
* can you share a screenshot of your current AO CDN Settings?
* can you share CDN Settings in W3 total cache?
* does this also happen when CDN is off in W3 total cache or is W3TC is off temporarily?
frank
Hi
• I have cleared W3 and Autoptimise cache multiple times
• This still happens with W3 CDN off
All settings are here https://imgur.com/a/GjCqEkQ
I also tried to use ob_start(), ob_get_contents(), etc to grab the wp_head() and then change the URL output by Autoptimize after everything is done. But I cannot change the out of Autoptimize using this method, head and footer.
Perhaps that is expected and its adding it somewhere else.
Thanks
bizarre … as a workaround you can use the autoptimize_html_after_minify
filter to replace your domain with the cdn, something like;
add_filter( 'autoptimize_html_after_minify', function( $html ) {
return str_replace( 'https://cusscard.com/wp-content/cache/autoptimize/', 'https://xxxxxx.cloudfront.net/wp-content/cache/autoptimize/', $html );
} );
Is your site using standard WordPress directory structure?
I was caught on this before…
Does that go in my themes functions.php?
happy to hear the workaround works cadianshock 🙂