![]() |
Overriding Public Folder In Codeigniter via composer plugin - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Overriding Public Folder In Codeigniter via composer plugin (/showthread.php?tid=67216) |
Overriding Public Folder In Codeigniter via composer plugin - koficypher - 01-27-2017 Hi, i recently tried my hands on codeigniter composer installer by Kenjis. it had a directory structure like this; codeigniter/ ├── application/ ├── composer.json ├── composer.lock ├── public/ │ ├── .htaccess │ └── index.php └── vendor/ └── codeigniter/ └── framework/ └── system/ I uploaded it into my www directory and i fired it up. I noticed that before i could actually see the welcome message i had to hada to navigate pass the public folder so i had something like this ; http://localhost/apple/public, before i could actually see the welcome message. Any ideas how to override that? i want to see the welcome message at http://localhost/apple and not http://localhost/apple/public. RE: Overriding Public Folder In Codeigniter via composer plugin - enlivenapp - 01-27-2017 Move index.php and .htaccess to the root of your project. Make sure $system_path, $application_folder and $view_folder point to the correct place in index.php There may be more to do, I'm not familiar with that project. RE: Overriding Public Folder In Codeigniter via composer plugin - koficypher - 01-27-2017 (01-27-2017, 09:28 AM)enlivenapp Wrote: Move index.php and .htaccess to the root of your project. Thanks a lot. It worked RE: Overriding Public Folder In Codeigniter via composer plugin - ciadmin - 01-27-2017 Nooooo. Leave index.php and .htaccess inside /public. Map your document root to the www/apple/public folder, instead of the www folder. If you use virtual hosting to do this, then you could end up with http://apple.local, behaving as expected! RE: Overriding Public Folder In Codeigniter via composer plugin - enlivenapp - 01-27-2017 Ah, um, yeah... i should have said "while its bad practice..." and mentioned the right way. *hangs head in shame* |