它可能是关于 Codeigniter + 404 页面错误的旧的和常规的查询。我已经尝试从以前的 stackoverflow 问题中回答这个问题。但是,我无法解决我的问题。
我已将 Codeigniter 项目从另一个系统(Ubuntu OS 64 位)复制到 Ubuntus OS 系统。但是,我默认得到 404 页面。如果我给http://localhost/project/index.php/admin/login
它工作但不给它http://localhost/project/admin/login
或http://localhost/project
.
这是我的配置:
config.php
$config['base_url'] = 'http://localhost/html/project';
$config['modules_locations'] = array(
APPPATH.'modules/' => '../modules/',
);
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
还有我的.htaccess文件:
Options FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>