Codeigniter can';t删除index.php

Codeigniter can';t删除index.php,php,apache,.htaccess,codeigniter,Php,Apache,.htaccess,Codeigniter,我真的需要帮助, 与标题相同,我的问题是无法删除codeigniter中的index.php 我尝试了许多.htaccess代码,如: // first <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /projectFolderName/ --> i already change to my project name RewriteCond %{REQUEST_URI} ^system.* Rewrite

我真的需要帮助, 与标题相同,我的问题是无法删除codeigniter中的index.php

我尝试了许多.htaccess代码,如:

// first 
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /projectFolderName/ --> i already change to my project name

 RewriteCond %{REQUEST_URI} ^system.*
 RewriteRule ^(.*)$ /index.php?/$1 [L]

 RewriteCond %{REQUEST_URI} ^application.*
 RewriteRule ^(.*)$ /index.php?/$1 [L]

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

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

//third
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ – [NC,L]
RewriteRule ^(.*)$ index.php/$1 [NC,L]

//fouth
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
在某些参考文献中 在我的httd.conf中

<Directory />
    AllowOverride All
    Require all denied
</Directory>

允许超越所有
要求全部拒绝
我将.htaccess移动到主项目文件夹(不在应用程序中)
但是一切都不起作用

你忘了在
application/config/config.php
中设置
base\u url

$config['base_url'] = 'your_url';
在根文件夹中
.htaccess

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

$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
在这里工作很好。

真有趣, 我的网址: 在我的配置中: $config['base_url']='';
你可以和我一样,用链接“igniter”替换检查url“Igniter'

您是否将htacces放在应用程序文件夹的外侧而不是内侧。谢谢您的回答,是的,我尝试了这两种方法,但不是同时尝试,放在-->内侧重新加载页面,放在-->外侧再次重新加载页面,但在这之前无法工作此问题已解决,我认为问题出在浏览器缓存中是的!!它的工作,在我发布的第一个.htaccess代码中,我已经编写了基本url,但实际上它不工作。这让我以前很疯狂。但现在它的工作无论如何感谢你的帮助是否因为浏览器上的缓存?或者什么?是的,有时可能是因为缓存。
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';