解决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的更多相关文章
- myeclipse中解决 java heap space/gc overhead limit exceeded eclipse 的方法
在Eclipse打包的时候报错:gc overhead limit exceeded eclipse 原因是Eclipse默认配置内存太小须要更改安装Eclipse目录下的eclipse.ini文件. ...
- 解决Android Studio出现GC overhead limit exceeded
方法一: 修改项目目录下的gradle.properties,增加如下配置信息(红色文字中需要根据自己电脑的配置修改内存大小,其余的配置用于加快gradle的编译速度) org.gradle.daem ...
- Apache开启伪静态后报500错误.
参考:http://blog.163.com/lgh_2002/blog/static/44017526201051452939761/ 加载Rewrite模块: 在conf目录下httpd.conf ...
- Apache的htaccess文件出现500错误的原因
Apache 我平时很少用到,今天测试环境下碰到个问题,老是500错误莫名其妙 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FI ...
- phpcms后台栏目权限修改无效的原因和解决方法
现象:在phpcms后台中,新建角色,然后修改角色对应栏目权限,结果一直只能选择一半数量的栏目.剩下的栏目怎么修改都不生效. 对比: step1:再另一个phpcms后台做同样操作,依旧是这个结果.跟 ...
- Codeforces Educational Codeforces Round 15 A. Maximum Increase
A. Maximum Increase time limit per test 1 second memory limit per test 256 megabytes input standard ...
- cf702A Maximum Increase
A. Maximum Increase time limit per test 1 second memory limit per test 256 megabytes input standard ...
- 解决 MySQL 分页数据错乱重复
前言 一天,小明兴匆匆的在通讯工具上说:这边线上出现了个奇怪的问题,麻烦 DBA 大大鉴定下,执行语句 select xx from table_name wheere xxx order by 字段 ...
- codeforces 702A A. Maximum Increase(水题)
题目链接: A. Maximum Increase time limit per test 1 second memory limit per test 256 megabytes input sta ...
随机推荐
- Spring实战第4版PDF下载含源码
下载链接 扫描右侧公告中二维码,回复[spring实战]即可获取所有链接. 读者评价 看了一半后在做评论,物流速度挺快,正版行货,只是运输过程有点印记,但是想必大家和你关注内容,spring 4必之3 ...
- python - Lambda函数 匿名函数
Lambda 匿名函数 python 使用 lambda 来创建匿名函数. lambda只是一个表达式,函数体比def简单很多. lambda的主体是一个表达式,而不是一个代码块.仅仅能在lambda ...
- 利用分块传输吊打所有WAF--学习笔记
在看了bypassword的<在HTTP协议层面绕过WAF>之后,想起了之前做过的一些研究,所以写个简单的短文来补充一下文章里“分块传输”部分没提到的两个技巧. 技巧1 使用注释扰乱分块数 ...
- Linux服务器关联Git,通过执行更新脚本实现代码同步
1.在Linux服务器安装Git yum install git -y tips: 卸载Git : yum remove git 2.在Linux生成ssh key 1)创建用户 git ...
- File类与IO流
一.File类与IO流 数组.集合等内容都是把数据放在内存里面,一旦关机或者断电,数据就会立刻从内存里面消失.而IO主要讲文件的传输(输入和输出),把内存里面的数据持久化到硬盘上,如.txt .avi ...
- C++——大小写转换
代码如下: #include <iostream> using namespace std; int main() { char ch; cin>>ch; if(ch>' ...
- 转载:使用ANSI转义码实现一个终端命令行界面
下文转载自:https://baijiahao.baidu.com/s?id=1630601858000127124&wfr=spider&for=pc 习惯于使用Linux的人,时常 ...
- ZT:如果有来生,要做一棵树
出处:https://zhidao.baidu.com/question/393644025.html 原以为是三毛所作,想不到还有争议. 如果有来生,要做一棵树, 站成永恒.没有悲欢的姿势, 一半在 ...
- Nginx小功能合集
13.1. 跨域处理 问题由来:浏览器拒绝执行其它域名下的ajax运作 ---如果浏览器在static.enjoy.com对应的html页面内,发起ajax请求偷盗www.enjoy.com域名下的内 ...
- Repeater每行绑定事件代码
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { Repea ...