404 on root blog of second multisite network in a multi-network install
-
We are on a corporate intranet, behind a firewall, so we cannot post a link to our site.
We have several multisite installs running with WordPress in its own folder, these all have no problems.
We are now trying to set up a multi-network install using the WP Multi Network plugin. We are on WordPress 4.1.1.
One network is here:
sww.sas.com/mysww
(and this network is running fine)
and one here:
myswwstage.sas.com/mysww
this is the one where we have a problem – the root blog displays the WordPress 404.php as its top page, and the admin pages for that network and the root blog are unusable because they do not get any CSS or jQuery.
there is a second site in the problem network and it is fine! (eg, myswwstage.sas.com/mysww/t2)
In our Apache error logs, for each request of myswwstage.sas.com/mysww/ we see three error lines like this:
File does not exist: /dept/iss/wp-includes, referer: https://myswwstage.sas.com/mysww/
/dept/iss/ is the document root of myswwstage.sas.com. the correct path to the wp-includes directory is:
/dept/iss/mysww_prod/wp/wp-includes/
At the same time, in the Apache access log, there is a 404 error for that page:
"GET /mysww/ HTTP/1.1" 404
as well as for the assets in /wp/ that it’s trying to get:
"GET /wp-includes/js/jquery/jquery.js?ver=1.11.1 HTTP/1.1" 404 "GET /wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1 HTTP/1.1" 404
however, it has no problem finding the assets in theme, which are in a custom content directory, here is one example from the access logs:
"GET /mysww/content/themes/twentyfifteen/style.css?ver=4.1.1 HTTP/1.1" 304
So in essence, for this one blog and the admin pages for the network and the root blog – WordPress does not know how to find… itself. It seems to lose the value of the ABSPATH constant.
We are at a loss as to how to debug this, and are about to give up on Multi-Network altogether and just run two separate multisites.
More wp-config.php details in case they are helpful:
// =================================================== // Multisite enablement // =================================================== define( 'WP_ALLOW_MULTISITE', true ); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); # define('DOMAIN_CURRENT_SITE', 'sww.sas.com'); As per WP-MULTI-NETWORK plugin define('PATH_CURRENT_SITE', '/mysww/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); // ======================== // Custom Content Directory // ======================== define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' ); define( 'WP_CONTENT_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/mysww/content' ); // =================== // Bootstrap WordPress // =================== if ( !defined( 'ABSPATH' ) ) define( 'ABSPATH', dirname( __FILE__ ) . '/wp/' ); require_once( ABSPATH . 'wp-settings.php' );
More Apache details in case they are helpful:
.htaccess:
RewriteEngine On RewriteBase /mysww/ RewriteRule ^index\.php$ - [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-(admin|includes).*) wp/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L] RewriteRule . index.php [L]
- The topic ‘404 on root blog of second multisite network in a multi-network install’ is closed to new replies.