Piwik not working on CDN / Cloudfront

Hi,
I just set up a new piwik install.
I use cloufront on this server, so I changed the tracking code

from this:
var u=((“https:” == document.location.protocol) ? “https” : “http”) + “://mydomain.com/piwik/”;

to

var u=((“https:” == document.location.protocol) ? “https” : “http”) + “://xyz.cloudfront_url/piwik/”;

When I did this, no tracking details were sent. Assoon as I replaced with the original, it started transmitting data.

the cloudfront url was fine. I tested it: i.e going to xyz.cloudfront_url/piwik sent me to the piwik screen just like with mydomain.com/piwik/

any idea why this is happening? Thanks for your help

Sorry, I found a work around in the forums. I searched for CDN but earlier did not find any hits :frowning:
This is the link that had the fix
http://forum.piwik.org/read.php?2,112345

Is this the most efficient fix?

Ray

This link no longer works