Separate CodeIgniter public folder

前端 未结 2 1704
后悔当初
后悔当初 2020-12-20 06:37

I\'ve been trying to change my CodeIgniter file structure to make it safer and cleaner but I can\'t get it to work. I want to separate the application/system and the public

2条回答
  •  旧时难觅i
    2020-12-20 07:07

    As per the CodeIgniter Installation Instructions...

    /var/application/
    /var/system/
    /var/www/index.php
    

    For the best security, both the system and any application folders should be placed above web root so that they are not directly accessible via a browser. By default, .htaccess files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn’t abide by the .htaccess.

提交回复
热议问题