Routes for large CI3 to CI4 upgrade |
Thank you!
My colleague came up with a solution that helps with routing pages between CI3 and CI4 while we migrate pages. It doesn't solve the session issue either, but we don't have a need for that at this time. For the solution she implemented, we have CI4 running in a subdirectory within CI3. CI3 has a controller called CI4redirector, and CI4 has a controller called CI3redirector. When we finish converting a page to CI4, we can add a route to the CI3 application/config/routes.php. For example, if we finish the news page our route would look like $route['news']='CI4redirector/ci4/news'; That would redirect the user to CI4. However, we want links on that CI4 page to direct to CI3 or CI4, depending on if we have converted that page or not. To achieve this, we use the CI3redirector within CI4 which routes back to CI3. Here is the code in the CI4redirector controller (located in \application\controllers\CI4redirector.php) Code: class CI4redirector extends CI_Controller { Here is the code in the CI3redirector controller (located in \CI4\app\Controllers\CI3redirector.php) Code: namespace App\Controllers; |
Messages In This Thread |
Routes for large CI3 to CI4 upgrade - by xanabobana - 03-07-2024, 08:10 AM
RE: Routes for large CI3 to CI4 upgrade - by kenjis - 03-07-2024, 05:50 PM
RE: Routes for large CI3 to CI4 upgrade - by xanabobana - 03-08-2024, 04:36 AM
RE: Routes for large CI3 to CI4 upgrade - by kenjis - 03-08-2024, 04:42 PM
RE: Routes for large CI3 to CI4 upgrade - by xanabobana - 03-13-2024, 11:56 AM
|