[Plugin: W3 Total Cache] "Replace site's hostname" not working for subdomains
-
I have W3 Total Cache setup with CloudFront Origin pull on exclusivedigest.com. I have a second domain (exclusivedigest.fastcdn.org) setup for serving the CloudFront content. The site can be accessed through several subdomains, so in my wp-config file I have the following so that all links point to the subdomain currently being used:
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']); define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
When accessing exclusivedigest.com, links are properly rewritten to the CDN domain. For example, https://exclusivedigest.com/wp-content/themes/Origin/images/logo.png is correctly rewritten to https://exclusivedigest.fastcdn.org/wp-content/themes/Origin/images/logo.png. When accessing id1.exclusivedigest.com (one of the subdomains), the URLs for CDN-hosted content are rewritten to https://exclusivedigest.fastcdn.org/https://id1.exclusivedigest.com/wp-content/themes/Origin/images/logo.png, which is an invalid URL.
Is there any way I can get W3 Total Cache to recognize this subdomain so that all URLs are correctly rewritten?
- The topic ‘[Plugin: W3 Total Cache] "Replace site's hostname" not working for subdomains’ is closed to new replies.