How do I access Codeigniter 4 base url on live server?
Try this okay.I hope it will work
I discovered that when I try to point all my url to public/index.php in my project it return error 404 based on it can't find my controller after rewriting my .htaccess to point to public/index.php in my project root directory.
This is how I solved my problem =>
I move the index.php and the default .htaccess from public directory to my project root directory then I edit the index.php to locate my app directory
E.g
index.php Default find this line
// This is the line that might need to be changed, depending on your folder structure.$pathsPath = FCPATH . '../app/Config/Paths.php';
Change it to
// This is the line that might need to be changed, depending on your folder structure.$pathsPath = FCPATH . './app/Config/Paths.php';
I hope this work for you