Routing not working for a particular Name. |
I'm using CI v4.2.4.
I'm using PHP Tools For Visual Studio 2019 by DevSense. I'm running the project locally with the PHP server installed and used by the PHP Tools. I don't think the built-in server uses .htaccess, so I'm fairly certain that's not it. I have a Controller named Project. PHP Code: <?php I have a GET route added: PHP Code: $routes->get("/Projects", "Project::all"); For some reason this is the only route that gives me a 'Not Found' response stating, "The requested resource /Projects was not found on this server." If I change the URL to localhost:23279/index.php/Projects it works just fine. If I try any other route that isn't defined (localhost:23279/blah, for example), I get the '404 - File Not Found' response stating, "Can't find a route for 'get: blah'.". However, if I add the route for '/blah' to 'Project::all', and navigate to localhost:23279/blah, then it works. Are there particular routes that are keywords or protected in some way? Thanks, Justin (01-29-2023, 10:03 AM)MonkFox Wrote: For some reason this is the only route that gives me a 'Not Found' response stating, "The requested resource /Projects was not found on this server." The error message comes from Apache, not CodeIgniter. That is the request is not yet routed to CodeIgniter. There is something wrong with your Apache configuration, not in CI's routing configuration. See https://codeigniter4.github.io/CodeIgnit...ith-apache |
Welcome Guest, Not a member yet? Register Sign In |