Overriding Public Folder In Codeigniter via composer plugin |
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.
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.
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!
Ah, um, yeah...
i should have said "while its bad practice..." and mentioned the right way. *hangs head in shame* |
Welcome Guest, Not a member yet? Register Sign In |