I’ve got a CodeIgniter project that until now has been only run remotely (it was built on a server… not my idea!). I pulled it from GitHub to my local machine (running OS X 10.6 where I have MySQL and PHP installed and configured).
When I go to the home page (http://localhost) it works fine (connects to DB, runs all the PHP, presents me with the correct page)… but when I click any links (for example, a link on a product that goes to http://localhost/product/details/464) I get a blank page or “Not Found The requested URL /product/details/464 was not found on this server.” instantly.
It’s as if somewhere in my stack Apache or PHP or CodeIgniter is dropping the ball and not realizing it’s supposed to be interpreting this URL and directing it to the proper controller, etc instead is trying to serve it up as if it’s a static file. I might be missing something obvious here, but I’ve been trying to troubleshoot for a few hours with no luck. Any help would be much appreciated!
The .htaccess is your problem, it’s not properly redirecting.
The default installation of Apache/PHP in Mac is bizarre. I had problems with CodeIgniter and Apache not recognizing the .htaccess file. Using MAMP [http://www.mamp.info/en/index.html] is a lot more stable and comparable to a Hosted environment.