CodeIgniter 4 Access denied message and a 403 response code in browser when hosting with Apache in Laravel Homestead.
It works fine with php spark server but when hosting with Apache the problem happens.
The solution is to update the /public/.htaccess file so that
RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]
RewriteRule ^([\s\S]*)$ index.php?/$1 [L,NC,QSA]
note the extra ? character after .php