CodeIgniter htaccess file for site sub folder

When creating a subfolder, on an existing site, create a .htaccess file like this to automatically map the CodeIgniter urls:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/index.php?/$1 [L]

Source: https://stackoverflow.com/questions/7527491/codeigniter-htaccess-subfolder-problem

Author: Joel Sutton

Me