W3 Total Cache
CDN Full Path Missing (8 posts)

  1. Josiah Sprague
    Posted 3 years ago #

    I turned on a CloudFront CDN in W3TC, and it seems to be almost working, except that my image paths are completely replaced with the CDN hostname, instead of just the hostname being replaced, so all of the images become dead links. For example, instead of having "http://cdn.cloudfront.com/wp-content/uploads/image.jpg" in the HTML I just have "http://cdn.cloudfront.com"

    What am I missing?


  2. Josiah Sprague
    Posted 3 years ago #

    I should clarify, only things in the Media Library do this. Theme resources work fine.

  3. Muhammad Haroon
    Posted 3 years ago #

    May you didn't change your server hostnames in your hosting.

  4. Josiah Sprague
    Posted 3 years ago #

    What do you mean that I should do? That isn't clear to me.

  5. Muhammad Haroon
    Posted 3 years ago #

    I meant that did you change the hostnames in your hosting... Where the domain is available...

  6. leandrorg
    Posted 3 years ago #

    It's happening the same problem with me and I didn't change anything about hostname.
    I've had supercache and cnd_sync_tool. I've decided to make a test with W3TC, because I'm very interested using memcache mode, but it isn't working on CDN. So, I've uninstalled supercache and cdn_sync_tool and I installed W3TC.
    All my images (from media library) are displayed only my cdn hostname, like that:

    <img width="300" height="120" src="http://cdn.xxxxxxxxx.com/" class="attachment-highlight wp-post-image" alt="" />

    The system has changed all image paths to only cdn hostname.
    I made some tests and the wordpress returns the right image infos. I could receive the right ID using get_post_thumbnail_id(). The problem is in replace hostname function.
    I've made another test too. I've uploaded a new image and put it in a post, but the problem continues, but I may see it on media gallery admin without problem.
    Any idea?

  7. leandrorg
    Posted 3 years ago #

  8. leandrorg
    Posted 3 years ago #

    I've discovered the problem.
    Yes, I changed my hostname. I use two servers for my blog, an admin and a frontend.
    The admin is admin.xxxxxxxxxx.com and the frontend is http://www.xxxxxxxxxx.com
    For all work fine I must to set in wordpress configuration:

    WordPress Address: admin.xxxxxxxxxx.com
    Site address: http://www.xxxxxxxxxxx.com

    And obviously my site works on http://www.xxxxxxxx.com, but W3TC uses admin.xxxxxxxxxx.com to do search_replace, and the rule breaks here.
    Is there any way to fix it?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.