ホームページ  >  記事  >  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 までご連絡ください。