我刚刚在Amazon Server上的IP地址上部署了CI。我已将default_controller设置为自定义控制器。我的所有控制器名称都是大写字母,文件名也是大写字母。但是除默认控制器之外的所有其他控所有资产和视图等都正常加载。只有控制器发出404错误。我已经仔细检查了所有文件名和控制器名称,一切都很好。我不知道造成这种情况的原因。服务器上的Mod重写也已启用。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
网址是website url
艾哈迈尔。
尝试在config.php中将空值设置为index_page
$config['index_page'] = '';
UPDATE
尝试更新您的htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>