我在多站点设置中遇到了这个问题。在我的辅助站点上加载脚本。php返回404错误。
wp config中的以下行。php为我修复了它:
define( \'CONCATENATE_SCRIPTS\', false ); # worked for me
我的。htaccess文件:
# BEGIN manual WordPress Multisite
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
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-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
我的wp配置。php其他设置:
define( \'WP_ALLOW_MULTISITE\', true );
define( \'MULTISITE\', true );
define( \'SUBDOMAIN_INSTALL\', false );
$base = \'/\';
define( \'DOMAIN_CURRENT_SITE\', \'localhost\' );
define( \'PATH_CURRENT_SITE\', \'/\' );
define( \'SITE_ID_CURRENT_SITE\', 1 );
define( \'BLOG_ID_CURRENT_SITE\', 1 );
define(\'COOKIE_DOMAIN\', \'\');
define( \'ADMIN_COOKIE_PATH\', \'/\' );
define( \'COOKIEPATH\', \'/\' );
define( \'SITECOOKIEPATH\', \'/\' );
define( \'CONCATENATE_SCRIPTS\', false );
/* That\'s all, stop editing! Happy publishing. */