如何删除codeigniter中的index.php?我尝试过普通技术,但没有';行不通

如何删除codeigniter中的index.php?我尝试过普通技术,但没有';行不通,php,.htaccess,codeigniter,Php,.htaccess,Codeigniter,我启动了一个codeigniter项目,效果很好。但我无法访问我在controller中创建的函数。删除index.php文件所需的全部id。我已将其从config.php中删除,并创建了.htaccess文件,并编写了所需的代码。但它没有反映 这是我的控制器 <?php defined('BASEPATH') OR exit('No direct script access allowed') class EduApp_Controller extends CI_Controller {

我启动了一个
codeigniter
项目,效果很好。但我无法访问我在controller中创建的函数。删除
index.php
文件所需的全部id。我已将其从
config.php
中删除,并创建了
.htaccess
文件,并编写了所需的代码。但它没有反映

这是我的控制器

<?php
defined('BASEPATH') OR exit('No direct script access allowed')
class EduApp_Controller extends CI_Controller {
public function index()
{
    $this->load->view('welcome_message');
}
public function first_message()
{
    $this->load->view('first_message');
}
}
config.php

$config['base_url'] = 'http://localhost/EduApp/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
.htaccess

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

重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php/$1[L,QSA]
我尝试过不同的方法,但没有一种对我有效。有人能帮我吗? 当我尝试使用以下url时,效果很好


http://localhost/EduApplication/index.php/Web_controller/first_message

确保您正在运行Apache,安装了mod_rewrite,并且Apache已设置为读取
。htaccess
文件请参阅this@kerbholz我确信appache正在运行,
mod_rewrite
在appache模块中被绿色勾选。这两个都没有解决我的问题。你面临的错误是什么?让我们知道错误是什么!
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>