簡體   English   中英

由於 index.php,Codeigniter 500 內部服務器錯誤

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM