Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19297

B on "[Plugin: W3 Total Cache] CDN URL duplication on Multisite / domain mapping"

$
0
0

Hi there-- I'm using WP3.8.1 multisite with domain mapping, and it appears that when I enable a generic mirror CDN, the URLs break. Here's what I get:

http://cdndomain.com/files/media/sites/files/media/sites/#/YYYY/MM/image.jpg

# is the site id number, as is traditional wordpress structure
YYYY is the year, and MM is the month (since I'm sorting uploads by year and month)

The problem here, is the duplication of /files/media/sites twice. Similar behavior is observed with the plugins directory:

http://cdndomain.com/files/media/sites/files/plugins/plugindir/js/plugin.js

As you can see, the plugins directory is inside of the uploads directory. Generically, the above reads as: /wp-content/uploads/sites/wp-content/plugins/plugindir/js/plugin.js.

My wp-content directory has been renamed files, and my uploads directory has been named media, hence the customization there. That is done using the following in my wp-config.php file (4th and last lines being relevant here):

$scheme = 'http://';
if($_SERVER['HTTPS'] == 'on') $scheme = 'https://';
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/files' );
define( 'WP_CONTENT_URL', $scheme.$_SERVER['HTTP_HOST'].'/files');
define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/files/plugins' );
define( 'WP_PLUGIN_URL', $scheme.$_SERVER['HTTP_HOST'].'/files/plugins');
define( 'PLUGINDIR', 'files/plugins');
define('UPLOADS', 'files/media');

Without W3TC CDNs enabled, these rules work properly. Any suggestions for making it work with W3TC CDNs would be much appreciated!

https://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>