Search code examples
php.htaccesscodeigniterinternal-server-error

Codeigniter site 500 internal error on server, but works fine on local machine


Here is my .htaccess file content-

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

Even I have tried by removing everything from index.php then adding an echo statement. But same 500 internal error.

It works fine @localhost using virtual host like xyz.dev.


Solution

  • Finally got the solution. Unfortunately it was file permission problem. When i upload files(even zip) through cpanel, file permission get messed-up. But when upload through FTP client like filezilla, it works perfect. thanks a lot for looking into this issue.