Welcome Guest, Not a member yet? Register   Sign In
Chrome/Firefox et al Routing problem

Hello all, here's my problem: I'm using CI 4.2.1 and I'm implementing the login procedure on an existing site. Since the default view has to be the login form, I do:

PHP Code:
// file: app\Config\Routes.php
$routes->get('/''Usuarios::login');   // prevents auto-routing 

This works correctly in Chrome but when I open the site using Firefox, Edge or Opera I hit a 404 error:

Quote:404 - File Not Found
Cannot access the controller in Defined Routes. Controller: \App\Controllers\Usuarios

However, the controller IS at app\Controllers\Usuarios.php and it works fine when listing/adding/deleting/editing users.

Any thoughts?

If you use Auto Routing Improved, you can't access controllers in your Defined Routes via auto routing.

Quote:For security reasons, if a controller is used in the defined routes, Auto Routing (Improved) does not route to the controller.

Exactly. If I hardcode a route, I expect that autorouting won't route to that controller, so when I defined '/' it should route to 'Users::login', which Chrome does but other browser don't. The point of my question isn´t wether routing is working or not but why it does work in Chrome but not in Firefox.

(This post was last modified: 06-23-2022, 09:22 AM by Gary.)

Floored by the same problem.

I see there are quite a few folk being blindsided by this improvement. One of just many examples: https://forum.codeigniter.com/showthread...#pid397607

Theme © iAndrew 2016 - Forum software by © MyBB