![]() |
Moving everything from root to a subfolder - 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: Moving everything from root to a subfolder (/showthread.php?tid=68445) |
Moving everything from root to a subfolder - kirpi - 07-11-2017 I am about to install a small (but very useful) "Coming Soon" set of pages available here https://prelauncher.net which, as far as I could understand after downloading it, has been created using CodeIgniter. If I manage to let it work as expected, such tool will be useful to gather some contacts before I open my small website. All the system comes inside a /prelauncher/ folder, which is nice and tidy. Now: if I take all the files and folders that I find in there, place them at root level, and type say https://example.com it all works fine. If instead (as I would prefer to) I keep all the package inside its own /prelauncher/ folder and type something like https://example.com/prelauncher/ then the system does not seem to work as it should. Where is the trick, please? I read the manual, but it is far from clear (unless you already know how such things should work) and real examples are not available. In short: if the whole thing works when all files are placed at root level, what and how should be changed in order to let it run when all the files are placed inside a /subfolder/ please? Thanks! RE: Moving everything from root to a subfolder - my_RZ - 07-11-2017 edit config.php $config['base_url'] = 'https://example.com/prelauncer/'; RE: Moving everything from root to a subfolder - ivantcholakov - 07-11-2017 @kirpi See this project: https://github.com/ivantcholakov/codeigniter-restserver-test If you download it and place it within a sub-folder it will just work. There is custom URL-autodetection included, examine the sources. RE: Moving everything from root to a subfolder - kirpi - 07-12-2017 (07-11-2017, 03:16 PM)my_RZ Wrote: edit config.php I went to application/config/config.php and changed this line: Code: $config['base_url'] = get_domain(); Code: $config['base_url'] = "https://example.com/prelauncher/"; Also, I noticed that, along with other folders and files inside /prelauncher/ (application, assets, database, system, uploads, index.php,...) there is a .htaccess file. There, I tried and change this: Code: ... Code: ... It seems that I am stucked. Now I will try ivantcholakov's suggestion, although I definitely believe there the solution should be the first one... Where am I wrong, please? RE: Moving everything from root to a subfolder - my_RZ - 07-12-2017 (07-12-2017, 05:30 AM)kirpi Wrote:(07-11-2017, 03:16 PM)my_RZ Wrote: edit config.php remove trailing slash in your .htaccess RewriteBase /prelauncher RE: Moving everything from root to a subfolder - kirpi - 07-12-2017 Also Code: RewriteBase /prelauncher Most probably this CodeIgniter thing is something useful but way too difficult and technical for me. I will stay content in taking all the files out of their /prelauncher/ folder and placing them at root level. Thank you all the same :-) RE: Moving everything from root to a subfolder - InsiteFX - 08-07-2017 If the ./application and ./system folders are moved to the root and index.php is in say public then you need to edit the index.php file and point the ./application and ./system folders to the correct folders. usually ../application and ../system RE: Moving everything from root to a subfolder - Wolfman - 08-17-2017 (07-11-2017, 01:58 PM)kirpi Wrote: I am about to install a small (but very useful) "Coming Soon" set of pages available here https://prelauncher.net which, as far as I could understand after downloading it, has been created using CodeIgniter. If I manage to let it work as expected, such tool will be useful to gather some contacts before I open my small website. I DLed the package from your linked site (nice - might use it myself). It is a "prepackaged" CI application I guess meant to be run from the domain root (http://mysite.com). It contains all the CI application and system files for a standalone app. You can use this and add your own app files or extract the prelauncher specific files (the Application folder) and merge it into your existing project. I would suggest running the prelauncher at the root of your domain and develop your application as a subdomain (http://mysite.com/dev). When ready, blow away the prelauncher, migrate release code to the root, tweak configs. Just my $.02 - good luck and don't give up the ship Regards, --Wolf-- |