Moving everything from root to a subfolder |
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!
@kirpi
See this project: https://github.com/ivantcholakov/codeign...erver-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. (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? (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
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 :-)
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 What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(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-- |
Welcome Guest, Not a member yet? Register Sign In |