Subdomain multisite and CDN url rewriting
-
I’m doing an experiment with Azure Front Door as a CDN and I’m trying to understand if I’ve misconfigured something in W3TC on my subdomain-based multisite installation.
This installation is on a dev server so the primary url is dev.mysite.com and sub-sites are at sub1.dev.mysite.com, sub2.dev.mysite.com, etc. Similarly, I’ve created urls and DNS entries for assets such as mainassets.mysite.com, subsite1assets.mysite.com, etc… and configured Front Door to accept these. sub1.dev.mysite.com uses a child theme of the theme running on dev.mysite.com (this is possibly important?).
In W3TC’s network settings, I’ve disabled “Use single network configuration file for all sites” so that each site can have its own CDN settings as needed. In the main site’s settings, I’ve enabled the CDN on the general settings page and on the advanced page selected Generic Mirror and added the url to Front Door for it and this works perfectly.
However, in the sub-site, when I did the same procedure (using it’s unique asset url instead), I get the following problem – assets such as images for the site have their urls re-written correctly and are served correctly from the CDN. The theme file urls are behaving very strangely though. They’re being re-written as
https://subsite1assets.mysite.com/https://dev.mysite.com/content/themes/{rest-of-path}
.I’m still working on debugging this, but I’m curious if you know of any reason it would occur. It’s possible that I may just need to use a single configuration for all sites, but I’m hoping not to do that if possible.
Please let me know what additional information I can provide. Thanks for any insight you can offer!
- You must be logged in to reply to this topic.