简体   繁体   English

由于 index.php,Codeigniter 500 内部服务器错误

[英]Codeigniter 500 internal server error due to index.php

I am working with codeigniter framework, and as I upload it to a host, it gave me a 500 Internal error.我正在使用 codeigniter 框架,当我将它上传到主机时,它给了我一个 500 内部错误。

But when I add index.php to config.php , it worked.但是当我将index.php添加到config.php时,它起作用了。

What should I do?我该怎么办?

In my .htaccess I have this:在我的 .htaccess 我有这个:

RewriteEngine On

RewriteBase /ci-framework/

And also when I clean /ci-framework/ from end of RewriteBase it doesn't work.而且当我从 RewriteBase 的末尾清理/ci-framework/时,它也不起作用。

Thank you very much.非常感谢你。

You don't need to add index.php in config.php file. 您不需要在config.php文件中添加index.php Make sure you have following line in .htaccess file: 确保.htaccess文件中有以下行:

<IfModule mod_rewrite.c>
  RewriteEngine On  
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

You do this:你做这个:

<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