首頁  >  文章  >  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