Error 404 on new controller |
Hi everybody.
My name is Edoardo and I'm trying to use code igniter 4.4.0 without result. First of all my apologize for my English. :-) The situation is the follow: I use Ubuntu 22.04 with apache2 and php8. I have a Vhost (DocumentRoot /var/www/html/corsoci4.ddns.net/public ServerName corsoci4.ddns.net) with the same configuration of when I used CodeIgniter 4.1. The problem with the new version is that I create a new Controllers called 'Articoli' with a method 'index' that return a view. In the file 'Routes.php' I inserted the folow row: $routes->get('/articoli', 'Articoli::index'); But when I try to call the url 'http://corsoci4.ddns.net/articoli' in the log I recived the follow error: '127.0.0.1 - - [17/Jan/2024:19:21:46 +0100] "GET /favicon.ico HTTP/1.1" 200 5731'. Also the change in the file 'Routes.php' I modify the follow files: Routing.php public bool $autoRoute = true; Feature.php public bool $autoRoutesImproved = true; I don't find any indication how to resolve my problem. Someone can help me? Best regards Edoardo
Code: $routes->get('/articoli', 'Articoli::index'); none of my routes have a "/" at beginning eg sample of my routes Code: $routes->get('newblog', 'Blog::blogForm'); (01-17-2024, 11:43 AM)idefix83 Wrote: But when I try to call the url What do you see when you try to call the url 'http://corsoci4.ddns.net/articoli' ? The Apache log you showed is not an error. |
Welcome Guest, Not a member yet? Register Sign In |