Welcome Guest, Not a member yet? Register   Sign In
CI4 Redirect points back to the Default Controller only
#1

(This post was last modified: 01-11-2022, 02:27 AM by algates. Edit Reason: Include Codes as PHP )

I have a CI4 Project which works well on Windows XAMPP. But, after I upload the same project to Ubuntu, the redirect only loads the Default Controller Page.

I altered the following setting on /app/Config/Routes.php

Before Change:
PHP Code:
$routes->setDefaultController('Home');
$routes->setDefaultMethod('index'); 


After Change:
PHP Code:
$routes->setDefaultController('RunnerList');
$routes->setDefaultMethod('Raw_Data'); 


Set of Routes:
PHP Code:
$routes->get('/''Home::index');
$routes->get('runnerRawData''RunnerList::Raw_Data');
$routes->get('runnerDBData''RunnerList::MDB_Data');
$routes->get('runnerCSVData''RunnerList::CSV_Data');
$routes->get('runnerJSONData''RunnerList::JSON_Data'); 


The Default Controller loads with no issues. But, when I type in the URL to access the other functions (runnerDBData, runnerCSVData, runnerJSONData) under the Controller Module, all points to the DefaultController / DefaultMethod settings only. I have read a lot of articles and modified the .htaccess, set the correct baseurl, enabled apache2 modrewrite, but somehow nothing seems to work the trick for me.

Let me know if you need any further info - Any help would be highly appreciated!!!
Reply


Messages In This Thread
CI4 Redirect points back to the Default Controller only - by algates - 01-10-2022, 06:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB