当前位置: 代码迷 >> PHP >> CI 框架去掉url 中index.php的步骤
  详细解决方案

CI 框架去掉url 中index.php的步骤

热度:437   发布时间:2016-04-28 17:31:29.0
CI 框架去掉url 中index.php的方法

1 修改 apache 的 httpd.conf 文件 

#LoadModule rewrite_module modules/mod_rewrite.so   

去掉前面的# 

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

内容如下

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

 

保存 ,重启就好了

 

  相关解决方案