配置.htaccess如下:

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

Apache(error.log)报错如下:

  1. 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.
  2. [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
  3. [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
  4. [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
  5. [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
  6. [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
  7. [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
  8. [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
  9. [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
  10. [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
  11. [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
  12. [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

  1. Loop Stopping Code ^
  2.  
  3. Sometimes your rewrites cause infinite loops, stop it with one of these rewrite code snippets.
  4.  
  5. RewriteCond %{REQUEST_URI} ^/(stats/|missing\.html|failed_auth\.html|error/).* [NC]
  6. RewriteRule .* - [L]
  7.  
  8. RewriteCond %{ENV:REDIRECT_STATUS} 200
  9. RewriteRule .* - [L]

修改后的.htaccess

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

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

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

  1. myeclipse中解决 java heap space/gc overhead limit exceeded eclipse 的方法

    在Eclipse打包的时候报错:gc overhead limit exceeded eclipse 原因是Eclipse默认配置内存太小须要更改安装Eclipse目录下的eclipse.ini文件. ...

  2. 解决Android Studio出现GC overhead limit exceeded

    方法一: 修改项目目录下的gradle.properties,增加如下配置信息(红色文字中需要根据自己电脑的配置修改内存大小,其余的配置用于加快gradle的编译速度) org.gradle.daem ...

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

    参考:http://blog.163.com/lgh_2002/blog/static/44017526201051452939761/ 加载Rewrite模块: 在conf目录下httpd.conf ...

  4. Apache的htaccess文件出现500错误的原因

    Apache 我平时很少用到,今天测试环境下碰到个问题,老是500错误莫名其妙 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FI ...

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

    现象:在phpcms后台中,新建角色,然后修改角色对应栏目权限,结果一直只能选择一半数量的栏目.剩下的栏目怎么修改都不生效. 对比: step1:再另一个phpcms后台做同样操作,依旧是这个结果.跟 ...

  6. 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 ...

  7. cf702A Maximum Increase

    A. Maximum Increase time limit per test 1 second memory limit per test 256 megabytes input standard ...

  8. 解决 MySQL 分页数据错乱重复

    前言 一天,小明兴匆匆的在通讯工具上说:这边线上出现了个奇怪的问题,麻烦 DBA 大大鉴定下,执行语句 select xx from table_name wheere xxx order by 字段 ...

  9. codeforces 702A A. Maximum Increase(水题)

    题目链接: A. Maximum Increase time limit per test 1 second memory limit per test 256 megabytes input sta ...

随机推荐

  1. C#还原对图像做的修改

    在C#程序中对图像进行处理,有的时候需要将处理后的图像还原,便于观察两者之间的区别,避免重新运行程序造成的麻烦.我是将之前写的Tab页中打开的图像进行还原,将原始图像数据保存在数据流中,然后从数据流中 ...

  2. python3笔记-列表

    列表去重的两种方式: # 创建列表放数据 a =[1,2,1,4,2] b=[1,3,4,3,1,3] d=[] for i in a: if i not in d: d.append(i) prin ...

  3. Spring Cloud:Consul基础知识

    一.基本概念 Consul是一套开源的分布式服务发现和配置管理系统,由HashiCorp公司用Go开发. 它提供微服务系统中的服务治理.配置中心.控制总线等功能. 服务发现:提供HTTP和DNS两种发 ...

  4. Mysql慢查询(分析工具)

    慢查询分析工具[mysqldumpslow] 常用的慢查询日志分析工具 汇总除查询条件外其他完全相同的SQL,并将分析结果按照参数中所指定的顺序输出 语法: mysqldumpslow -s r -t ...

  5. Java实现获取命令行中的指定数据

    构造一个ping的命令类这个类中可以设置需要ping的目标域名类提供方法public void exec();方法执行完毕后可以读取ping的次数,ping的成功回应包个数ping的丢包个数,ping ...

  6. Maven是什么? Maven的概念+作用+仓库的介绍+常用命令

    Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型.一组标准集合,一个依赖管理系统.和用来运行定义在生命周期阶段中插件目标和逻辑. 核心功能 Maven的核心 ...

  7. 没有修改getModel()方法的返回值导致的Hibernate接收不到页面数据

    异常1.通过id进行查询,但id为null,就出现这个异常!java.lang.IllegalArgumentException: id to load is required for loading ...

  8. canvas绘制图片drawImage学习

    不得不说,html5中的canvas真的非常强大,从图片处理,到视频处理,再到游戏开发,都能见到canvas的身影,然而,就这一个<canvas>标签,功能居然如此强大,这主要归功于can ...

  9. python之Lambda

    Python 匿名函数lambda   lambda表达式在“:”后只能有一个表达式.也就是说,在def中,用return可以返回的也可以放在lambda后面,不能用return返回的也不能定义在py ...

  10. pytest文档1-pytest+Allure+jenkins+邮箱发送

    前言: 1.pytest+allure是目前很多公司使用较多的一种报告样式,因为它更详细,各种指标更直观(简单的说就是看着更高大上,更能装X). 环境准备: 1.Windows10 2.Allure ...