使用PHP CGI在根域上出现CodeIgniter错误404

使用PHP CGI在根域上出现CodeIgniter错误404,php,apache,.htaccess,codeigniter,Php,Apache,.htaccess,Codeigniter,因此,今天我将服务器上的PHP和apache升级到PHP5.4和Apache2.4版本。 然后我注意到,在一个使用旧版本codeigniter的域上(我尝试回显CI_版本,但没有显示任何内容),在根域上显示错误404。但是键入domain.com/home就可以了。(home是我的默认控制器)。键入任何其他控制器也可以正常工作。但domain.com显示错误404 .htaccess <IfModule mod_rewrite.c> Options +FollowSymLin

因此,今天我将服务器上的PHP和apache升级到PHP5.4和Apache2.4版本。 然后我注意到,在一个使用旧版本codeigniter的域上(我尝试回显CI_版本,但没有显示任何内容),在根域上显示错误404。但是键入domain.com/home就可以了。(home是我的默认控制器)。键入任何其他控制器也可以正常工作。但domain.com显示错误404

.htaccess

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /

    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ index.php/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]

    #This last condition enables access to the images and css folders, and the robots.txt file
    RewriteCond $1 !^(index\.php|apc\.php|assets|nivo-slider|hr|stm|elearning|docs|adminer|favicon\.ico|file|flash|tinymce|robots\.txt)
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    ErrorDocument 404 /application/errors/404.php
</IfModule>
routes.php

$route["default_controller"]    = "home";
$route["error_controller"]      = "error";
$route['scaffolding_trigger'] = "";

我试图更改uri协议以查询字符串和请求uri,但仍然不起作用。

我通过在.htaccess上添加
DirectoryIndex home
解决了这个问题

$route["default_controller"]    = "home";
$route["error_controller"]      = "error";
$route['scaffolding_trigger'] = "";