CodeIgniter Forums
Is it possible to move index.php in order to increase security? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Is it possible to move index.php in order to increase security? (/showthread.php?tid=1428)



Is it possible to move index.php in order to increase security? - Mina - 03-09-2015

Hello folks! Smile

I'm new to CodeIgniter and I'm used to have a subdirectory like "public" or "web" in which I do only store the js, img and css along with the index.php and to which I point my URL in order to keep the user from digging deeper within the directories.
Is it possible to move the index.php to another directory level without breaking anything or should I better keep to the solution given in the documentation?
Thanks for answering and sorry for my English!

Greetings,
Mina


RE: Is it possible to move index.php in order to increase security? - silentium - 03-09-2015

Absolutely. All you need to do is update the $system_path and $application_folder variables in your index.php file.

http://www.codeigniter.com/userguide3/general/managing_apps.html


RE: Is it possible to move index.php in order to increase security? - Mina - 03-10-2015

Your solution worked perfectly well for me, so thank you very much! Smile


RE: Is it possible to move index.php in order to increase security? - CroNiX - 03-10-2015

There really isn't a point to moving index.php for security as all CI requests route through it. The application and system directories can be moved and you just need to tell index.php where they moved to.