CodeIgniter not opening pages other than homepage on local server

Issue: You've checked out a project from Git or some other repository on local machine and you've been able to get the homepage to work, but all other pages don't open.

Possible Solution: Try setting up an .htaccess file in the same folder as your index.php with the following code:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA] 
Do not update this file to the server (staging/live) from where you originally checked out the code (how to?).

Comments