Tutorial first app issues when not installed in doc root |
Folks,
New to CodeIgniter 4, used earlier versions and really liked it. I'm doing a clean install using Composer and pretty much following the Manual/Tutorial directions. All seemed well, but having problem with the ci-news demo app and generated URLs. I see several areas where URLs can be adjusted, but I don't want to fight it and would like a clean solution. My setup: Web server doc root /pub/comwww/soaringtools - www.soaringtools.org [don't want to change that, existing site] Tutorial Steps: Installed in the directory: /pub/comwww/soaringtools/ci-news using composer and moved dirs as recommended. (contents) app/ builds* composer.json composer.lock license.txt phpunit.xml.dist public/ README.md spark* tests/ vendor/ writable/ Followed the tutorial, updated Routes.php as directed, no changes to Paths.php, no changes to .htaccess in public directory, edited the .env file to set DEVELOPMENT and DB access info, no change to baseURL What works now: https://www.soaringtools.org/ci-news/public -- brings up the Welcome to Codeigniter OK https://www.soaringtools.org/ci-news/public/home or about-- brings up those pages OK https://www.soaringtools.org/ci-news/public/news -- brings up the news summary page OK, but "View article" links are wrong. They generate the URL -> https://www.soaringtools.org/ci-news/pub...is-sighted instead of -> https://www.soaringtools.org/ci-news/pub...is-sighted (which does work) [url=https://www.soaringtools.org/ci-news/public/news/elvis-sighted][/url] Can this be adjusted/fixed simply? Do I need to move the public directory? I want the final URLs to start with: https://www.soaringtools.org/ci-news/new ... (no public) I see adjustments possible in: ci-news/public/.htaccess - use RewriteBase as suggested there, but to what? ci-news/.env - change the value of app.baseURL, to what? ci-news/app/Config/Paths.php -- change systemDirectory or appDirectory, both? -- or do I just need to adjust the generated paths in the view directly. Any help is welcome. I'm trying to avoid forcing it by using the wrong methods. Many Thanks! John |
Messages In This Thread |
Tutorial first app issues when not installed in doc root - by jmurtari - 05-05-2020, 09:18 AM
RE: Tutorial first app issues when not installed in doc root - by jreklund - 05-05-2020, 10:40 AM
RE: Tutorial first app issues when not installed in doc root - by jmurtari - 05-05-2020, 11:25 AM
RE: Tutorial first app issues when not installed in doc root - by jreklund - 05-05-2020, 11:42 AM
RE: Tutorial first app issues when not installed in doc root - by jmurtari - 05-05-2020, 12:45 PM
RE: Tutorial first app issues when not installed in doc root - by jreklund - 05-05-2020, 01:30 PM
RE: Tutorial first app issues when not installed in doc root - by jmurtari - 05-06-2020, 06:10 AM
|