WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Issue with multiple CNAME CDN rewriting (5 posts)

  1. Jason Penney
    Member
    Posted 3 years ago #

    I've noticed that when the same image (for example) appears in the same page multiple times and multiple CNAMES are used the URLs same URL may be re-written to point to different host names.

    So http://example.com/wp-content/images/icon/icon1.png may be rewritten as http://cdn1.example.com/wp-content/images/icon/icon1.png, http://cdn2.example.com/wp-content/images/icon/icon1.png, and http://cdn3.example.com/wp-content/images/icon/icon1.png in the same page meaning it's now three network connections instead of one.

    There's probably a more efficient way to do this, but would it be possible to change it so that when a matching URL is found that URL is replaced in the entire page? So the first time it was hit it would replace all http://example.com/wp-content/images/icon/icon1.png with http://cdn1.example.com/wp-content/images/icon/icon1.png, then if it later tried to replace it with http://cdn2.example.com/wp-content/images/icon/icon1.png it wouldn't be there any more.

    For now I've just gone back to using a single CDN host and that works fine. Thanks!

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    That's something I've noticed and considered too. I brought this up with David Ward, who sent me the patch for the multiple CNAME support but didn't hear back from him. I'll come up with something to fix this.

    Thanks.

  3. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Oops, I replied on the wrong thread (Thanks Iain, by email). This should be fixed in the development version.

  4. Jason Penney
    Member
    Posted 3 years ago #

    Thanks so much! I'll try it out.

  5. Jason Penney
    Member
    Posted 3 years ago #

    Works great. Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic