没有index.php,Codeigniter无法访问控制器

没有index.php,Codeigniter无法访问控制器,php,.htaccess,codeigniter,codeigniter-3,Php,.htaccess,Codeigniter,Codeigniter 3,我当地的xampp codeigniter项目的url是 但是后来我想从url中删除index.php部分,所以我遵循了userguide中给出的步骤 之后,我可以使用url访问该项目,而无需index.php 我有一个名为Home的控制器,我可以使用 ,但尝试使用访问时,会出现以下错误: 这是我的配置: $config['base_url'] = 'http://localhost/ci_yudeesh/'; $config['index_page'] = ''; $config['uri_

我当地的xampp codeigniter项目的url是 但是后来我想从url中删除index.php部分,所以我遵循了userguide中给出的步骤

之后,我可以使用url访问该项目,而无需index.php

我有一个名为Home的控制器,我可以使用 ,但尝试使用访问时,会出现以下错误:

这是我的配置:

$config['base_url'] = 'http://localhost/ci_yudeesh/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
这是我的.htaccess:

<IfModule authz_core_module>
    Require all denied
</IfModule>
<IfModule !authz_core_module>
    Deny from all
</IfModule>

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

有人能帮我修一下吗?我尝试了所有其他类似问题的答案,但没有一个有效

从应用程序文件夹中删除.htaccess并将其放在应用程序文件夹之外,并且只在其中写入以下代码。如果它不工作,那么我会给你另一个.htaccess代码

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

更改.htaccess文件。从现有文件中删除代码,并在文件中添加以下代码:-

重新启动发动机

1美元^index.php | resources | robots.txt

重写库/ci_yudeesh/

重写cond%{REQUEST_FILENAME}-f

重写cond%{REQUEST_FILENAME}-d

重写规则^.*$index.php?/$1[L]

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]