Buenas Tardes, mi problema es que al subir mi sistema el cual está realizado en Codeigniter 4, la página del login la abre bien, encuentra la ruta y ejecuta el método login() del controlador LoginController.php esta ruta la estoy creando como GET ya que no estoy pasando ningún valor de formulario, el problema está cuando intento acceder ingresando los datos para validar el acceso, se supone que estoy pasando valores de los input correo y contraseña, osea que esa ruta debe ser POST, pero al ingresar los datos y enviar los datos del formulario me da el error: No se puede encontrar una ruta para ‘GET: verificar’. (No se puede encontrar una ruta para ‘GET: verificar’.), no entiendo porque se supone que la ruta debe ser POST, en localhost funciona muy bien. No se porque me da este error. Gracias de antemano. Saludos
Please note: this is an english-only forum!
Translation:
My system is not running as it should
Good afternoon, my problem is that when I upload my system which is made in Codeigniter 4, the login page opens well, finds the route and executes the login() method of the LoginController.php controller. I am creating this route as GET since I am not passing any form value, the problem is when I try to access by entering the data to validate the access, I am supposed to be passing values for the email and password input, meaning that route should be POST, but when entering the data and sending the form data I get the error: Cannot find a route for ‘GET: verify’. (Cannot find a route for ‘GET: verify’.), I don’t understand why the route is supposed to be POST, on localhost it works very well. I don’t know why it gives me this error. Thanks in advance. Regards
Did you check the Network log in your browser to verify that the request is actually being sent as POST to the server?
Also make sure that there is no redirect in between. If you send a POST request to a URL, and that URL redirects you elsewhere, that redirected request will be a GET request. Given that it works locally: redirecting to www or non-www domains or HTTP or HTTPS might be something to look at.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.