我在Wordpress上有一个网站,我在其上启用了多站点
*/
define('WP_DEBUG', false);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'domainname');
define('PATH_CURRENT_SITE', '/pathofwordpress/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
define( 'WP_ALLOW_MULTISITE', true );
网站的结构就像这个domain.com/wordpress/everythinginwordpress 现在我在wordpress domain.com/wp-test.php之外创建了一个文件 并将wp-load函数加载到其中
$_SERVER['HTTP_HOST'] = "domain.com/pathtowordpress/multisite/";
define( 'WP_USE_THEMES', false );
require('pathtowordpress/wp-load.php');
<?php get_header(); ?>
现在这个wp-load将我重定向到domain.com/pathtowordpress,而不是它应该获取/ multisite /的头部 任何有关它的帮助将非常感谢