codeigniter:删除index.php不起作用

mri*_*dul 3 codeigniter

我正在尝试从网址中删除index.php。但它不起作用!

使用 ubuntu 12.04(LAMP)。

CodeIgniter_2.1.2

.htaccess 文件

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /cms1



        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php/$1 [L] 
    </IfModule>
Run Code Online (Sandbox Code Playgroud)

在 config.php 中:

$config['index_page'] = 'index.php'; to $config['index_page'] = '';
Run Code Online (Sandbox Code Playgroud)

目录结构:

/var/www/cms1

->cms1
    ->application
    ->system
    ->user_guide
    ->index.php
    ->license.txt
    ->.htaccess
Run Code Online (Sandbox Code Playgroud)