您好,欢迎访问一九零五行业门户网

ci url怎么去掉index.php

ci url去掉index.php的方法:首先修改配置文件;然后搜索htaccess将allowoverride none改为“allowoverride all”;最后建立“.htaccess”文件即可。
本文操作环境:windows7系统、codeigniter3.0版,dell g3电脑
去掉index.php:
首先修改配置文件, $config['index_page'] = ' '; 设置空
然后修改apache,搜索 htaccess  将 allowoverride none 改为  allowoverride all
搜索 rewrite_module modules/mod_rewrite.so  打开去掉#
在ci的根目录下,在system的同级目录下,建立.htaccess文件(创建.htaccess 用notepad++),写入如下内容:
rewriteengine on
rewritecond $1 !^(index\.php|images|robots\.txt)
rewriterule ^(.*)$ /codeigniter/index.php/$1 [l]
我的项目地址是 http://localhost/codeigniter/index.php/user
重启apache直接访问  http://localhost/codeigniter/user  
推荐:《php视频教程》
以上就是ci url怎么去掉index.php的详细内容。
其它类似信息

推荐信息