codeigniter localhost internal server error 500 codeigniter localhost internal server error 500 codeigniter codeigniter

codeigniter localhost internal server error 500


This .htaccess script works perfectly for me. Place it within the first set of folders inside your project directory. Same level as the index.php file

RewriteEngine onRewriteCond $1 !^(index\.php|public|\.txt) RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?$1

The error 500 can be checked on the apache error.log file using the following path /var/log/apache2/error.log

Check the last error listed and fix it.


See this question: .htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

Essentially, you need to turn on mod_rewrite. That's why you're getting the " Invalid command 'RewriteEngine' error message.

Additionally, since you're project path is in /sc/ you need to set you base to /sc/:

RewriteEngine OnRewriteBase /sc/RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*) index.php?/$1 

And place the htaccess file in the /sc/ folder.


Activate a rewrite_module in your WAMP. It comes disabled by default