由于可能的配置错误,请求超出了 10 个内部重定向的限制.? [英] Request exceeded the limit of 10 internal redirects due to probable configuration error.?

查看:34
本文介绍了由于可能的配置错误,请求超出了 10 个内部重定向的限制.?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的重写

RewriteRule ^.*$ addnew/$0

但是我得到了

Request exceeded the limit of 10 internal redirects due to probable configuration error.

我正在尝试重写

www.mysite.com/anycharacter

www.mysite.com/anycharacter

进入

www.mysite.com/addnew/anycharacter

www.mysite.com/addnew/anycharacter

推荐答案

试试下面的解决方案,它对我有用.我希望这对你也有用.

Try the folllowing solution, it works for me.I hope this will work for you too.

  1. 在做任何事情之前 - 备份你的数据库!

  1. BEFORE DOING ANYTHING - BACKUP YOUR DB!

现在,进入 wordpress > 设置 > 永久链接

Now, go into wordpress > settings > permalinks

将其设置为漂亮的永久链接设置之一,例如//year/month/'

Set it to one of the pretty permalink settings like //year/month/'

在您的 PC/Mac 上打开一个文本编辑器,然后打开您从您的计算机上下载的 .htaccess 文件网络服务器

Open a text editor on your PC/Mac and open the .htaccess file you downloaded from your webserver

找到这段代码

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

  • 用这段代码替换它,由 Scott Yang 提供:

  • Replace it with this piece of code, courtesy of Scott Yang:

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.+)$ /index.php/$1 [L,QSA]
    </IfModule>
    

  • 将此代码上传到您服务器上的主域根目录即可.

  • Upload this code into the main domain root directory on your server and you're done.

    一切正常

    这篇关于由于可能的配置错误,请求超出了 10 个内部重定向的限制.?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆