解决Use 'LimitInternalRecursion' to increase the limit if necessary的问题 CodeIgniter .htaccess

配置.htaccess如下:

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|images|robots\.txt|css|js);
RewriteRule ^(.*)$ /sis/index.php/$1 [L]

Apache(error.log)报错如下:

12220:tid 1848] [client ::1:50815] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion‘ to increase the limit if necessary. Use ‘LogLevel debug‘ to get a backtrace.
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3590): [client ::1:50815] AH00121: r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/sis/index.php/news/create
[Thu Sep 10 14:24:14.491172 2015] [core:debug] [pid 12220:tid 1848] core.c(3596): [client ::1:50815] AH00122: redirected from r->uri = /sis/index.php/news/create

搜集到的有用的参考资料:http://www.askapache.com/htaccess/modrewrite-tips-tricks.html

Loop Stopping Code ^

Sometimes your rewrites cause infinite loops, stop it with one of these rewrite code snippets.

RewriteCond %{REQUEST_URI} ^/(stats/|missing\.html|failed_auth\.html|error/).* [NC]
RewriteRule .* - [L]

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]

修改后的.htaccess

RewriteEngine on
RewriteBase /
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
RewriteCond $1 !^(index\.php|images|robots\.txt|css|js);
RewriteRule ^(.*)$ /sis/index.php/$1 [L]

问题解决:浏览器地址栏中输入http://localhost/sis/news(不用输入index.php),页面打开正常。

解决Use 'LimitInternalRecursion' to increase the limit if necessary的问题 CodeIgniter .htaccess

时间: 2024-08-03 23:14:00

解决Use 'LimitInternalRecursion' to increase the limit if necessary的问题 CodeIgniter .htaccess的相关文章

解决安卓编译 the 64K Reference Limit

关于64k 引用限制的说明 Android application (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. The Dalvik Executable specification limits the total number of methods

Apache开启伪静态后报500错误.

出自:http://blog.163.com/lgh_2002/blog/static/44017526201051452939761/ Apache开启伪静态后报500错误. 检查APACHE日志发现如下信息: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if

phpcms后台栏目权限修改无效的原因和解决方法

现象:在phpcms后台中,新建角色,然后修改角色对应栏目权限,结果一直只能选择一半数量的栏目.剩下的栏目怎么修改都不生效. 对比: step1:再另一个phpcms后台做同样操作,依旧是这个结果.跟踪了半天代码,也没有发现什么问题. setp2: 把之前本地备份的网站进行操作,却发现可以修改. 经过2个部分的对比,发现可能是web环境不同的原因.于是顺藤摸瓜.去看apache的日志文件. [Sat Jan 17 11:42:01 2015] [error] [client 123.147.19

解决magento批量assign产品到分类时最多只能save成功1000件的问题

注 :文章中问题已在Magento EE 1.14 / CE 1.9得到验证. 最近,我发现了一件非常奇怪的问题.当为一批产品(大于1000件)分配分类时,只有最多一千件产品能够保存成功,而其他的都被忽略了.为了解决这个问题,就需要我们去深入magento的源码进行分析测试. 下面是Magento如何分配产品类别的源码: class Mage_Adminhtml_Catalog_CategoryController extends Mage_Adminhtml_Controller_Action

IT忍者神龟之 配额不足的解决方法ORA-01536: space quota exceeded for tablespace

今天有同事反映最近几天的数据在oracle中查不到.检查TT的错误日志显示:TT5211: TT5211: Oracle out of resource error in OCIStmtExecute(): ORA-01536: space quota exceeded for tablespace 'TBSLOG' rc = -1 -- file "bdbTblH.c", lineno 2452, procedure "ttBDbStmtForce()". 明显的

由ORA-28001同时带出ORA-28000的解决办法

今天,在登录tomcat前台界面时发现不能登录,查看log后发现原来是ORA-28001: the password has expired的错误,这个错误是由于Oracle11G的新特性所致, Oracle11G创建用户时缺省密码过期限制是180天(即6个月), 如果超过180天用户密码未做修改则该用户无法登录. 可通过如下SQL语句 SELECT * FROM dba_profiles WHERE profile='DEFAULT' AND resource_name='PASSWORD_L

Oracle 错误代码详解及解决方式--ORA

ORA-00001: 违反唯一约束条件 (.)错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常.ORA-00017: 请求会话以设置跟踪事件ORA-00018: 超出最大会话数ORA-00019: 超出最大会话许可数ORA-00020: 超出最大进程数 ()ORA-00021: 会话附属于其它某些进程:无法转换会话ORA-00022: 无效的会话 ID:访问被拒绝ORA-00023: 会话引用进程私用内存:无法分离会话ORA-00024: 单一进程模式下不允许从多个进程注册ORA-0

域名从www跳转到非www,Apache和Nginx2种解决方式

背景:www跳转到非www. http://www.jiutianniao.com和http://jiutianniao.com 都可以访问. 但是,想把www这个重定向到非www,输入更简单,让搜索引擎也把他们当作同1个网站. 2种解决办法: 1.Apache: 在项目jiutianniao下,新建".htaccess"文件. RewriteEngine On RewriteCond %{HTTP_HOST} ^www.jiutianniao.com RewriteRule (.*)

外贸电子商务网站之Prestashop 安装后台中文语言包

1.先进入到后台,我们进入Localization-> Localization2, 在下面的国家列表中,我们选择china ,导入即可. 3.进入Localization-> Translations,在出现的列表中选择后台翻译. 在选右上角的我的参数这个,把语言选成中文简体,保存,就可以了用中文了.此时,后台变为中文,前台仍是英文. 如果在第3步出现如下的提示 警告!您的PHP配置限制在表单字段允许的最大数量是 2500 for max_input_vars.Please ask your