由于可能的配置错误,请求超出了10个内部重定向的限制. [英] Request exceeded the limit of 10 internal redirects due to probable configuration error.?
问题描述
我有一个简单的重写
RewriteRule ^.*$ addnew/$0
但是我得到
Request exceeded the limit of 10 internal redirects due to probable configuration error.
我正在尝试重写
www.mysite.com/任何字符
www.mysite.com/anycharacter
进入
www.mysite.com/addnew/任何字符
www.mysite.com/addnew/anycharacter
推荐答案
尝试以下解决方案,它对我有用.我希望这也对您有用.
Try the folllowing solution, it works for me.I hope this will work for you too.
-
执行任何操作之前-备份数据库!
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屋!