My CodeIgniter application shows a 500 error, and I suspect it's due to `mod_rewrite`. How do I verify this and what's the typical `.htaccess` fix?

Question

Grade: Education Subject: Support
My CodeIgniter application shows a 500 error, and I suspect it's due to `mod_rewrite`. How do I verify this and what's the typical `.htaccess` fix?
Asked by:
147 Viewed 147 Answers

Answer (147)

Best Answer
(467)
To verify if `mod_rewrite` is the issue, you can create a `phpinfo()` file and look for 'mod_rewrite' under 'Loaded Modules'. If it's not listed, it's not enabled. The typical fix involves ensuring `mod_rewrite` is enabled in your Apache configuration (usually `a2enmod rewrite` on Debian/Ubuntu or uncommenting in `httpd.conf` on CentOS/RHEL). Once enabled, ensure your `.htaccess` file has the standard CodeIgniter clean URL rules, starting with `RewriteEngine On`.