0

我正在尝试在 Web 服务器上生成我的网站,但遇到了一些令人困惑的 codeigniter 路由问题。我通过在我的根目录中使用以下 .htacess 取出了 index.php。

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

我已经尝试了几乎所有我在 stackoverflow 和其他来源中找到的东西,包括移动 / 和更改 uri 协议。这个问题(除其他外)没有任何东西对我有用。我相信我以正确的方式删除了 index.php,但我仍然收到以下 404 错误:

Not Found
The requested URL /home was not found on this server.

以下是我的config.php文件中的一些信息

$config['base_url'] = '';

$config['index_page'] = '';

$config['uri_protocol'] = 'REQUEST_URI';

任何其他信息或发生这种情况的原因都将非常有帮助。

4

0 回答 0