首页  >  文章  >  php教程  >  CI 框架去掉url 中index.php的方法,ciindex.php

CI 框架去掉url 中index.php的方法,ciindex.php

WBOY
WBOY原创
2016-06-13 09:05:45904浏览

CI 框架去掉url 中index.php的方法,ciindex.php

1 修改 apache 的 httpd.conf 文件 

#LoadModule rewrite_module modules/mod_rewrite.so   

去掉前面的# 

2 找到 你程序目录下的 .htaccess 文件

内容如下


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

 

保存 ,重启就好了

 

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn