步骤;

1.打开你的WEB服务器的httpd.conf文件.

2.找到LoadModule rewrite_module modules/mod_rewrite.so这行,把该行前的#去掉。保存该文件

3.

进入到CI根目录,新建.htaccess文件,输入
RewriteEngine on
RewriteCond $1 !^(index\.php|style|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
当然如果你的目录不是根目录,则要注意,比如我的URL为http://localhost/ci,则最后一行要改为RewriteRule ^(.*)$ /ci/index.php/$1 [L]

4.保存.htaccess可以使用另存为的方式,然后文件类型选择“All Files”即可保存

5.最后到CI目录下的config文件夹下,在config.php文件中,将$config['index_page'] = "index.php"; 修改为 $config['index_page'] = ""; 最后重启Apache 服务器,再次访问,就不需要输入index.php了。

最新文章

  1. 解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
  2. Go收藏
  3. centos7 安装nginx和php5.6.25遇到 无法访问php页面 报错file not found 问题解决
  4. android-解决EditText的inputType为Password时, 字体不一致的问题
  5. Strom Topology执行分析:worker数,Bolt实例数,executor数,task数
  6. [HDU 4828] Grids
  7. python 连接oracle 数据库
  8. 14.10.1 InnoDB Disk I/O
  9. 《转》VC++多线程编程
  10. [翻译]初识SQL Server 2005 Reporting Services Part 1
  11. ubuntu环境下jdk安装及jenkins安装
  12. HDFS笔记——技术点汇总
  13. python经典书籍推荐:Python核心编程
  14. 深入理解SpringCloud之Eureka注册过程分析
  15. MFC函数—— CFrameWnd::OnCreateClient
  16. windows virus-search-kill-monitor
  17. Spark Streaming 例子
  18. UVALive7261(2015ACM/ICPC北京赛区现场赛A)
  19. 常见的浏览器兼容性问题与解决方案——CSS篇
  20. 解决flashfxp连接虚拟机报错 530 permission denied

热门文章

  1. OpenCV2.x自学笔记——Qt5.5.1打包exe
  2. ElasticSearch(5)-Mapping
  3. Delphi用ADOquery主从表例子(转总结)
  4. Leetcode016 3Sum Closest
  5. chapter 13_4 跟踪table的访问
  6. Mybatis批量更新数据
  7. Asp.Net MVC 在后台获取PartialView、View文件生成的字符串
  8. cookie机制和session机制的区别(面试题)
  9. javaWEB总结(2): load-on-startup节点
  10. 瑞游天翼客户端win7,win8,win10