I have structure directory in Codeigniter like this
/application
/assets
/system
.htaccess
index.php
test.php
And this is my .htaccess file
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
What i want is, if user access any other PHP or HTML file except index.php, it'll be redirected to index.php. For example, if someone access test.php, it'll be redirected to index.php. But i want it only work for root directory and not effected to other directory
I've already try from here but it didn't work for me