CodeIgniter 500 Internal Server Error

前端 未结 11 777
忘掉有多难
忘掉有多难 2020-12-11 16:10

I downloaded a PHP script written using CodeIgniter. when I run it from the localhost, on going to the admin folder, it shows localhost again. Also when running from my web

相关标签:
11条回答
  • 2020-12-11 16:46

    I know I am late, but this will help someone.

    Check if rewrite engine is enabled.

    If not, enable rewrite engine and restart server.

    sudo a2enmod rewrite
    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-12-11 16:48

    This works fine for me

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?/$1 [L]
    </IfModule >
    
    0 讨论(0)
  • 2020-12-11 16:49

    You're trying to remove index.php from your site URL's, correct?

    Try setting your $config['uri_protocol'] to REQUEST_URI instead of AUTO.

    0 讨论(0)
  • 2020-12-11 16:49

    remove comment in httpd.conf (apache configuration file):

    LoadModule rewrite_module modules/mod_rewrite.so 
    
    0 讨论(0)
  • 2020-12-11 16:50

    The problem with 500 errors (with CodeIgniter), with different apache settings, it displays 500 error when there's an error with PHP configuration.

    Here's how it can trigger 500 error with CodeIgniter:

    1. Error in script (PHP misconfigurations, missing packages, etc...)
    2. PHP "Fatal Errors"

    Please check your apache error logs, there should be some interesting information in there.

    0 讨论(0)
提交回复
热议问题