2013-07-12 56 views
1

我最近将一个wordpress站点从服务器移到了我的本地环境,并且当我尝试访问wordpress站点时出现以下错误本地我的电脑上:错误310(net :: ERR_TOO_MANY_REDIRECTS):本地wordpress站点有太多重定向


This webpage has a redirect loop 
The webpage at `http://localhost:8888/folder/site/` has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer. 

Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects. 

但是我能去http://localhost:8888/folder/site/wp-admin本地和登录并查看WordPress网站的后台。

这是我走上从服务器获取WordPress网站到我的电脑的步骤:

  • 我在MySQL数据库中导入的WordPress站点本地。

    • 我在phpMyAdmin的wpkapi_options表中将siteurl更改为http://localhost:8888/folder/site/
  • 我复制并粘贴从服务器上的所有文件到本地一个文件夹,名为/站点文件夹/

  • 我编辑了wp-config.php文件以下的事情:

    定义('DB_NAME','localdb');

    define('DB_USER','root');

    define('DB_PASSWORD','root');

然后我去了localhost:8888/folder/site/,看到上面的错误。我继续尝试以下事情来尝试解决此错误:

我清除了所有的Cookie,但这并不奏效。我尝试了一个不同的浏览器,但没有奏效。

I changed the siteurl in the database from `http://localhost:8888/folder/site/` to `localhost:8888/folder/site/` and then tried `http://www.localhost:8888/folder/site/` but they both didn’t work. 

我停用所有的插件通过插件改变plugins文件夹的名字aplugins并没有奏效。

我试过注释掉header('Location:./');在index.php中,并没有工作。

我甚至尝试注释掉org_1.htaccess文件下面,但没有奏效:

# BEGIN WordPress 
# <IfModule mod_rewrite.c> 
# RewriteEngine On 
# RewriteBase/
# RewriteRule ^index\.php$ - [L] 
# RewriteCond %{REQUEST_FILENAME} !-f 
# RewriteCond %{REQUEST_FILENAME} !-d 
# RewriteRule . /index.php [L] 
</IfModule> 
+0

我有同样的问题,确保你已经添加了新的数据库用户具有相应权限。 – Webkix

回答

1

我是一个完整的WP小白所以记住这一点。我在wp-config.php文件中读到,可以将数据库表的前缀从'wp'更改为任何内容,所以我将其更改为'tbl'。

在此之后没有太多时间,我开始在FireFox中发现“太多重定向”,并且在Choome中出现了“此页面有重定向循环”。 IE不会显示 - 没有错误。

我根据FireFox清除了cookie并开始挖掘。所以我将表前缀改回到“wp”(我所做的最后一个配置类型更改),保存了更改并停止了重定向。

我承认,这并不直接说你的问题,但我觉得它很有趣,一个“简单”的变化导致东西太意外了。

相关问题