WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
CDN Full Path Missing (8 posts)

  1. Josiah Sprague
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Josiah Sprague
    Member
    Posted 1 year ago #

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

  3. Muhammad Haroon
    Member
    Posted 1 year ago #

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

  4. Josiah Sprague
    Member
    Posted 1 year ago #

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

  5. Muhammad Haroon
    Member
    Posted 1 year ago #

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

  6. leandrorg
    Member
    Posted 1 year 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?
    Thanks.

  7. leandrorg
    Member
    Posted 1 year ago #

  8. leandrorg
    Member
    Posted 1 year 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?
    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.