Welcome Guest, Not a member yet? Register   Sign In
Trying to remove index.php from url in latest codeigniter 4.5.1
#8

(05-03-2024, 05:31 AM)demyr Wrote: Another way : Go to Public folder, move (or copy) htaccess and index.php to the main app folder. Then in your main app/index.php find the line 34 and change the path like

PHP Code:
require FCPATH 'app/Config/Paths.php'

The virtualhost is pointing (as recommended in user_guide) to the public folder, so moving/copying the index.php and .htaccess from public to app/ didn't work


(05-08-2024, 02:56 AM)elbambolo Wrote: If you want to open a page likeĀ http://sw/services
you have to remove the "/" in the Config/Routes.php

like this:
Code:
$routes->get('services', 'Services::index');

With or without "/" didn't work

I've finally solved it by getting the appStarter again working from scratch in another folder/virtualhost
Then moved to the non-working application all the files, mainly the ones from app/Config and again overwriting everything from /vendor/codeigniter4/framework/app/Config

Don't know which file from app/Config was making conflict, but maybe I've touched or edited something that didn't make it work

Thanks 2 everyone
Reply


Messages In This Thread
RE: Trying to remove index.php from url in latest codeigniter 4.5.1 - by kabeza - 05-08-2024, 04:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB