2

I inherited a multisite Wordpress network and am running into a strange issue after updating to Wordpress 4.5. For my domain mapping, I am using the Wordpress MU Domain Mapping plugin.

On a few of my sites, images are not appearing due to a 404 error. I can fix this by changing the primary domain in Tools -> Domain Mapping to the network admin, but this changes the domain of the site I am trying to fix.

In other words, if the main network site is networksite.com and the site I'm trying to fix is subsite.com, I can only fix the images by changing the setting in Domain Mapping to make the domain networksite.com/subsite. This isn't what we want.

When the images work, this is the path to the image displayed on the live page:

http://networksite.com/subsite/wp-content/blogs.dir/13/files/2014/12/image.jpg

This is odd, because the real path to the image file doesn't contain the subsite name at all.

When I set subsite.com as the primary domain, this is the path that returns a 404:

http://subsite.com/wp-content/blogs.dir/13/files/2014/12/image.jpg

Of note, the preview of the page uses the working image path regardless of the Domain Mapping selection. The permalink is also in networksite.com/subsite format.

Here is my current domain rewrite section of the htaccess file in the public html folder of my site. It comes directly from the Network Setup instructions:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

And here is the relevant section of my wp-config.php file:

define('WP_DEBUG', false);
define('WP_ALLOW_MULTISITE', true);
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'networksite.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
sadq3377
  • 827
  • 1
  • 5
  • 17
  • Did you ever find a solution to this issue? Im currently having the same problem, im guessing it could be related to httpd.conf maybe? – Lewis Browne Jul 11 '18 at 09:10

0 Answers0