I have a domain mapped website. It is currently functioning well, but I want to add support for a pull CDN. I'm attempting to use Amazon CloudFront, but am a little stumped on one issue.
I've set CloudFront to pull from the non domain mapped URLs. However the domain mapping plugin (Donnacha's) is redirecting the upload folder URLs to the domain mapped URL, which means that the pull CDN actually caches a page which redirects to another one. You can see the issue in the following CloudFront URL:
That file pulls from the following URL:
Which is domain mapped to this URL:
I could setup a separate CloudFront deployment for each mapped domain, but that would be a pain to do every time I add a new site.
Any ideas on what the best way to approach this is? I'm assuming I'm not the first person to stumble across this issue.