[Plugin: W3 Total Cache][Plugin: WordPress-HTTPS] W3TC cache URL issue over SSL
-
I am using version 3.3.2 of WordPress with version 0.9.2.4 of W3 Total Cache and version 3.0.3 of WordPress-HTTPS (the newest versions as of writing this). I have page caching (disk: enhanced), minify (auto, disk, HTML: default, JS: JSMin (default), CSS: Default), database cache (disk), and object cache (disk), and browser cache enabled in W3TC. WordPress-HTTPS is configured to use a subdomain for HTTPS (i.e. secure.domain.com) and the WordPress Address and Site Address in WordPress General Settings are set to http://www.domain.com
The SSL certificate was created for the specific secure subdomain (so https connections to http://www.domain.com or domain.com won’t load) and SSL connections (using the secure subdomain) work correctly for everything except for W3TC’s cache files. The CSS cache file tries to load using an absolute URL at https://www.domain.com/wp-content/w3tc/min/025baa35.a78352.css (instead of https://secure.domain.com) so it doesn’t load—everything using a relative URL (/wp-content/etc/etc) loads correctly using the secure subdomain over https. The Javascript cache file doesn’t even try to load at all (there is no link to it in the
head
). To be clear, when not using an https connection, W3TC uses relative URLs to load the W3TC CSS and Javascript cache files and they both appear in thehead
(that is, everything loads as it should).I tried to add in a rewrite rule in the root .htaccess file to rewrite https://www.domain.com to https://secure.domain.com but it either led to a too many redirects error or simply did not change the URL that W3TC was using. I also emptied the W3TC caches and cleared the browser’s cache with every change to make sure there was no issue with changes not propagating.
That having been said, does anyone have any idea if this is a W3TC issue or a WordPress-HTTPS issue. Naturally, when I turn off W3TC everything loads as normal over the https secure subdomain, but with W3TC turned on the page appears unstyled because CSS doesn’t load for the aforementioned reason. I’m not sure if this is an issue with W3TC using an absolute URL for some reason or if this is a bug with WordPress-HTTPS where it isn’t rewriting a URL that it should be rewriting. Either way, regardless of where the problem stems from, I’m aiming for both of the W3TC cache files (CSS and JS) to load and to be linked as relative URLs over https (not just over insecure connections on the www. domain). Until I can accomplish this I have to compromise on way or the other by turning off W3TC (and not having as efficient of a site) or not using https connections (and not having as secure of a site).
Any help would be appreciated. Thanks.
http://wordpress.org/extend/plugins/w3-total-cache/
http://wordpress.org/extend/plugins/wordpress-https/
- The topic ‘[Plugin: W3 Total Cache][Plugin: WordPress-HTTPS] W3TC cache URL issue over SSL’ is closed to new replies.