配置.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的更多相关文章

  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. MockMvc编写单测

    目录 MockMvc 注意点 code 待测试的controller 测试类 github MockMvc 注意点 1.通过spring上下文获取mockmvc对象 @BeforeEach publi ...

  2. Linux 操作系统 基础

    root: 管理员 /: 根目录[windows : 计算机] ~: 家目录: 管理员:/root/.. 非管理员:/home/... 命令提示符: [root@localhost abc]#: ro ...

  3. Codeforces 1389 题解(A-E)

    AC代码 A. LCM Problem 若\(a < b\),则\(LCM(a,b)\)是\(a\)的整数倍且\(LCM(a,b) \ne a\),所以\(LCM(a,b) \ge 2a\),当 ...

  4. libtorrent资料整理

    源码libtorrent源码地址:https://github.com/arvidn/libtorrent/releases libtorrent Java库地址:https://github.com ...

  5. 08_线程间通信 ITC

    1.线程间的通信方式 1.共享全局变量 2.线程队列(queue) 3.信号量(Semaphore) 2.共享全局变量进行通信 from threading import Thread import ...

  6. 自编Basic脚本 用BasicIntepreter执行 打印九九乘法表

    源码下载:https://files.cnblogs.com/files/heyang78/BasicInterpreter2-20200601-2.rar 用编程语言打印九九乘法表不难,用自编解释器 ...

  7. [Java数据结构]使用Stack检查表达式中左右括号是否匹配

    Stack是一种先进后出的数据结构后,这个特点决定了它在递归向下的场景中有独到的功效. 以下程序展示了它在检查表达式中括号匹配的有效性: 程序: package com.heyang.util; im ...

  8. Python基础 读取二进制文件

    问题 有二进制文件中保存了 20 亿个 2 Bytes 的数,需将其读出,每 20000 个数作图,拟合后输出结果. 解决 # -*- coding: utf-8 -*- ""&q ...

  9. 理解C#回调函数

    序言 本篇主要学习了C#回调函数的定义使用.欢迎各位大牛的指导. 正文 回调函数是什么? 回调函数就是一个通过函数指针调用的函数.如果你把函数的指针(地址)作为参数传递给另一个函数,当这个指针被用来调 ...

  10. postman测试接口

    一.postman安装 不介绍.可百度搜索.安装完成后如下: 二.postman测试接口 get请求: post请求:请求参数如果是json格式,则如下 上传文件:如果接口中要求上传文件,可如下操作 ...