Ron Rennick on "[Plugin: WordPress MU Domain Mapping] Images Broken (404) After Newest Update"

ساخت وبلاگ

I inherited a multisite WordPress network and am running into a strange issue after updating to the 0.5.5.1 version of your plugin from version 0.5.4.2.

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

When I set subsite.com as the primary domain, this is the path that retus 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.

Also of note, going to http://subsite.com/wp-content/blogs.dir/13/files/2014/12/image.jpg directly shows me the image--but only if the domain mapping option is currently set to networksite.com/subsite

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 );

The problem resolves when I restore my backup copy of the older version of the plugin (making no other changes). Any ideas on how to fix this so that I can stay up to date?

https://wordpress.org/plugins/wordpress-mu-domain-mapping/

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 247 تاريخ : پنجشنبه 20 خرداد 1395 ساعت: 10:29