ホームページ  >  記事  >  バックエンド開発  >  CI中怎么去掉index.php

CI中怎么去掉index.php

WBOY
WBOYオリジナル
2016-06-13 12:50:29875ブラウズ

CI中如何去掉index.php


CI中去掉index.php


apache中伪静态的配置

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

apache中alias的配置

Alias /test "f:/www"  
<directory>  
    Options Indexes FollowSymLinks
    AllowOverride all
    Order allow,deny 
    Allow from all 
</directory>  


将CI中配置文件

application/config/config.php中

$config['index_page'] = "index.php";

改为$config['index_page'] = "";

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。