![](/img/trans.png)
[英]CodeIgniter .htaccess - 500 Internal Server Error/ index.php remove
[英]Codeigniter 500 internal server error due to index.php
我正在使用 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>
你做這個:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.