Viewing 2 replies - 1 through 2 (of 2 total)
  • finglandj

    (@finglandj)

    The problem is occurring because of an erroneous replacement.

    There is a script:

    (function(){
    				var srcStrt = "https://cdn10.brovadoweddings.com/blog/wp-content/uploads/p4/images/",
    					bioData = [{"filename":"biopic1_1303345244.jpg","url":""},{"filename":"biopic2_1303345256.jpg","url":""},{"filename":"biopic3_1303345281.jpg","url":""},{"filename":"biopic4_1303345304.jpg","url":""}],
    					picNum  = Math.floor(Math.random()*(bioData.length)),
    					markup  = '<img id="biopic" src="'+srcStrt+bioData[picNum].filename+'" width="260" height="390" alt="MN Wedding Photography | Minneapolis Wedding Photographers | Engagement Photographer bio picture" class="bio-col" />';
    				if ( bioData[picNum].url ) {
    					markup = '<a href="'+bioData[picNum].url+'">'+markup+'</a>';
    				}
    				document.write(markup);
    			})();

    srcStart is getting modified by uri_to_cdn_uri which trims the trailing slash.

    uri_to_cdn_uri is in w3-total-cache/lib/W3/Plugin/CdnCommon.php
    Lines 544 and 550 trim slashes from the returned url. Changing those to an ltrim ensures the directory structure is maintained.

    atopps

    (@atopps)

    Thanks! I was looking for this exact fix as well!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3TC is DISCARDING Directory structure when using CDN’ is closed to new replies.