Welcome Guest, Not a member yet? Register   Sign In
404s on Controller Methods
#1

Working on migrating an app from v2 -> v3. 

In config.php: 
PHP Code:
$config['base_url'] = 'http://localhost/ci3';
$config['index_page'] = '';
$config['uri_protocol']    = 'REQUEST_URI'

My Login controller (controllers/Login.php):
PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');
    class 
Login extends CI_Controller{
        public function 
index(){
            
$data['main_content'] = 'login_form';
            
$data['page_title'] = 'Login';
            
$this->load->view('includes/login_signup_template'$data);
        }

        public function 
forgot(){
            
//load a view that collects the user's email address
            
$data['main_content'] = 'registration/forgot_collect_email';
            
$data['page_title'] = 'Forgot Password';
            
$this->load->view('includes/login_signup_template'$data);
        }

    } 

In routes.php: 
PHP Code:
$route['default_controller'] = 'login';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE

SO: 
https://localhost/ci3 -> This loads my login page. 
https://localhost/ci3/login/forgot -> This gets a 404 

Any ideas on what I am doing wrong here? This is driving me nuts.
Reply


Messages In This Thread
404s on Controller Methods - by bgoldstein24 - 11-06-2020, 01:21 PM
RE: 404s on Controller Methods - by midhunlalkc - 11-06-2020, 11:33 PM
RE: 404s on Controller Methods - by InsiteFX - 11-07-2020, 09:10 AM
RE: 404s on Controller Methods - by bgoldstein24 - 11-07-2020, 09:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB