Moving index.php in separate folder by default ? |
Hi, All.
You know that the common structure of CodeIgniter now is: Code: / - Root folder This way always application and system folders are in the site root folder. I know that there are htaccess restrictions but even this way its not the right way to have them structured. I want to suggest - perhaps even from CI 3.0 as its not a real new feature or upgrade.. To create one additional folder and to move inside it the main index.php file as: Code: / - Root folder This way only 1 PHP file will be in a public path.. I am always making such structure on CI setup as I don't accept that the base structure is right. That is the reason to suggest this change here.. So what do you think about that ? Regards Best VPS Hosting : Digital Ocean
Look, let them just release 3.0. At least your proposal needs documentation updates, this would take some time.
I'm sure this is already possible and has been available since 2.x
If you edit index.php, you can change the paths in the following variables. $system_path = 'system'; $application_folder = 'application';
There is enough time until session lib is 100% up
![]() Best VPS Hosting : Digital Ocean
I never tried it, but it looks like you can already do that. From the main CI index.php file :
Code: /* Code: /* (11-24-2014, 08:02 AM)includebeer Wrote: I never tried it, but it looks like you can already do that. From the main CI index.php file : You're absolutely right. You can change those and move your files wherever you need to. You could even have several sites that all reference a single install of CI core (the system folder) if you wanted. Having ran an open-source project on top of CI for several years now, I can say that making that security measure a default is a bad thing. Many developers don't have the experience to work around some of the other challenges it creates. One of the biggest being the way that cPanel handles primary domains - they must be in the main web folder. To use it in a subfolder (like the public folder mentioned above) requires some .htaccess tricks that many people aren't familiar with. To keep the framework simple to use for everyone, keeping it with the more "traditional" structure is definitely the best. And cuts down a LOT in support requests. ![]()
Absolutely agree with your points, keep things simple and "traditional", not to overwhelm beginner users (majority).
When beginners become advanced hackers, they eventually know what and where to configure to make their app more "secure". Anyway, glad that CodeIgniter is being adopted! |
Welcome Guest, Not a member yet? Register Sign In |