我正在使用 codeigniter 框架,当我将它上传到主机时,它给了我一个 500 内部错误。
但是当我将 index.php
添加到 config.php
时,它起作用了。
我该怎么办?
在我的 .htaccess 中我有这个:
RewriteEngine On
RewriteBase /ci-framework/
而且,当我从 RewriteBase 的末尾清理 /ci-framework/
时,它也不起作用。
非常感谢。
最佳答案
您不需要在config.php
文件中添加index.php
。
确保您在 .htaccess
文件中有以下行:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
关于php - 由于 index.php 导致 Codeigniter 500 内部服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28246168/