404s on Controller Methods |
Working on migrating an app from v2 -> v3.
In config.php: PHP Code: $config['base_url'] = 'http://localhost/ci3'; My Login controller (controllers/Login.php): PHP Code: <?php In routes.php: PHP Code: $route['default_controller'] = 'login'; 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.
Hi,
you need to set the route for forgot Page. in routes.php Code: $route['login/forgot'] = 'login/forgot';
Also your base_url should have an ending / slash on it.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-07-2020, 09:10 AM)InsiteFX Wrote: Also your base_url should have an ending / slash on it. Thanks for responding! I will add the / to it thanks for that. What I found was that if I put "index.php" back into all the URLs everything works fine. I follow the steps in the doc to remove "index.php" from the config, but I think I am missing something. I also made sure I updated .htaccess to process the rewrite. Are there any links that you know are reliable in their directions for removing "index.php"? |
Welcome Guest, Not a member yet? Register Sign In |