Wordpress 多站点导致错误 101 (net::ERR_CONNECTION_RESET):未知错误

发布于 2024-09-26 00:26:40 字数 1272 浏览 1 评论 0原文

我们刚刚安装了 WordPress 3.0.1,一切正常。然而,当我们开始按照这个教程安装多站点功能时,事情就开始出错了。在第 5 步结束时,本教程会要求您更新 wp-config.php 文件和 .htaccess 文件。一旦我们对这些文件进行了建议的更改,将它们上传回服务器并尝试重新登录,就不会再提供任何页面。现在,我们在博客中的所有页面上都收到以下错误:

Error 101 (net::ERR_CONNECTION_RESET): Unknown error.

有什么想法吗?以下是我们所做的代码更改(在子文件夹设置之后):

wp-config.php

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'oursite.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

.htaccces 文件(在 WordPress 根目录中)

# BEGIN WordPress
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]
# END WordPress

We have just installed WordPress 3.0.1 and everything worked fine. However, as soon as we started to install the multisite functionality by following this tutorial, things started to go wrong. At the end of step 5, the tutorial has you update your wp-config.php file and .htaccess file. Once we made the reccommended changes to these files, uploaded them back to the server and tried to re-log in, no pages would serve up anymore. We now get the following error for ALL pages in the blog:

Error 101 (net::ERR_CONNECTION_RESET): Unknown error.

Any ideas? Here are the code changes we made (following the sub-folder setup):

wp-config.php

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'oursite.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

.htaccces file (in wordpress root directory)

# BEGIN WordPress
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]
# END WordPress

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜扑 2024-10-03 00:26:40

在 wp.config 上,插入:

define('WP_ALLOW_MULTISITE', true);

Just do it!

On wp.config, insert:

define('WP_ALLOW_MULTISITE', true);

Just do it!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文