Skip to content

How to work code-igniter project in sub-folder

Codeigniter

Many developer has issues when they are migrating website from local to server. Then code-igniter website not working. Here is the solution which you used and resolve your problem.

When this happens when you have 2 .htaccess files on the server with two CodeIgniter project.
 
Very simple solutions just add the following code in your CodeIgniter sub folder and your project will work.

 

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