mbiven
Forum Replies Created
-
Yes, these are internal objects (css, js, images) and images from an external source (our cdn).
Focusing on only the internal objects…
if I was to load https://www.stage.domain.com the css, js and images all show they are loading from stage.domain.com:80 (via firebug). On this stage server stage.domain.com is the main site and https://www.stage.domain.com is a site in stage.domain.com’s network.
I expect that multisite is causing the problem. My understanding is that it has a series of redirects it will use and that is why I’m seeing requests for css,js and images from stage.domain.com.
And as an example the theme pulls in the stylesheet using this:
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"/>
and that returns:
<link rel="stylesheet" href="https://www.stage.domain.com/wp-content/themes/THEME_NAME/style.css"/>
I would expect that your plugin would see the the stylesheet_url request and handle the change?
/** * Filters HTTPS urls from bloginfo function * * @param string $result * @param string $show * @return string $result */ function bloginfo($result = '', $show = '') { if ( $show == 'stylesheet_url' || $show == 'template_url' || $show == 'wpurl' || $show == 'home' || $show == 'siteurl' || $show == 'url' ) { $result = $this->replace_https($result); } return $result; }
Does this plugin work with multisite and/or domain mapping?
I’m encountering the partially encryption errors and I’ve tried both the 1.9.2 and the 19.3.-dev version of this plugin with no success. I’ve disabled domain mapping with trying the plugin with no change.
Thanks,
Michael
Forum: Networking WordPress
In reply to: Multisite and Domain mapping media upload issueThese are systems I’ve inherited so I cannot answer how it worked before domain mapping was enabled, but from the nature of our sites it *should* have always been there.
We do have some sites that are mapped to subdomains.
So aaa.domain.com is mapped to blah.aaa.com. To stop the domain mapping plugin from adding the www we edit the domain mapping plugin as show below. That is also the only place I see a redirect adding a www in either the .htaccess, apache vhosts, W3TC, domain mapping etc. For those sites we :domain_mapping.php
starting at line 511$wpdb->suppress_errors( $s ); $protocol = ( 'on' == strtolower( $_SERVER['HTTPS' ] ) ) ? 'https://' : 'https://'; if ( $domain ) { if( $domain == 'blah.aaa.com' || $domain == 'blah.bbb.com' ){ $return_url[ $wpdb->blogid ] = untrailingslashit( $protocol.$domain ); } else { $return_url[ $wpdb->blogid ] = untrailingslashit( $protocol.'www.'.$domain ); }
.htaccess
———# BEGIN W3TC Browser Cache <IfModule mod_deflate.c> <IfModule mod_setenvif.c> BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html </IfModule> <IfModule mod_headers.c> Header append Vary User-Agent env=!dont-vary </IfModule> AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon </IfModule> <FilesMatch "\.(css|js)$"> FileETag None <IfModule mod_headers.c> Header set X-Powered-By "W3 Total Cache/0.9.1" </IfModule> </FilesMatch> <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$"> FileETag None <IfModule mod_headers.c> Header set X-Powered-By "W3 Total Cache/0.9.1" </IfModule> </FilesMatch> <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$"> FileETag None <IfModule mod_headers.c> Header set X-Powered-By "W3 Total Cache/0.9.1" </IfModule> </FilesMatch> # END W3TC Browser Cache RewriteEngine On RewriteBase / #uploaded files RewriteRule ^(.*/)?files/$ index.php [L] RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RewriteRule ^(.+)$ $1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]