简体   繁体   中英

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.

But when I add index.php to config.php , it worked.

What should I do?

In my .htaccess I have this:

RewriteEngine On

RewriteBase /ci-framework/

And also when I clean /ci-framework/ from end of RewriteBase it doesn't work.

Thank you very much.

You don't need to add index.php in config.php file. Make sure you have following line in .htaccess file:

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM