Wordpress 多站点导致错误 101 (net::ERR_CONNECTION_RESET):未知错误
我们刚刚安装了 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 wp.config 上,插入:
Just do it!
On wp.config, insert:
Just do it!