HostGator and CodeIgniter: How to fix mod_rewrite — Eric A. Hicks, MBA

I came across this problem today. I just purchased a HostGator Baby account. I got everything installed, and CodeIgniter will pull up a home page, but any other page redirects to the home page.

After a little digging, I discovered a solution. You just have to open your /application/config/config.php file and replace this…

$config['uri_protocol'] = "AUTO";

with this…

$config['uri_protocol'] = "REQUEST_URI";

I hope that helps someone out!

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image