Welcome Guest, Not a member yet? Register   Sign In
use of $route in routes.php
#1

(This post was last modified: 11-04-2017, 06:33 AM by richb201.)

I am having trouble understanding what I am doing wrong.  I have a routes.php in my config directory. It has these routes:
$route['default_controller'] = 'users/login';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['registration'] = 'users/registration ';
$route['login'] = 'users/login';


In my views folder I have subdir called users with two files login.php and registration.php. Here is the bottom of the login.php:


Don't have an account? <a href="<?php echo base_url(); ?>registration">Register here</a></p>
</div>
</body

When a user enters the site they type localhost/sub_crud/ and are brought to the login page. So far so good. 
My hope was that when a user clicks on the registration link above, then the URI would be localhost/sub_crud/registration, which it is, but would really view localhost/sub_crud/users/registration, which I guess is not working. I get Object Not Found from the browser when I click on the registration link. I am sure it is something basic that I am missing here. Any help for a beginner is appreciated. 
proof that an old dog can learn new tricks
Reply


Messages In This Thread
use of $route in routes.php - by richb201 - 11-04-2017, 05:28 AM
RE: use of $route in routes.php - by InsiteFX - 11-04-2017, 09:32 AM
RE: use of $route in routes.php - by richb201 - 11-04-2017, 10:00 AM
RE: use of $route in routes.php - by InsiteFX - 11-05-2017, 05:12 AM
RE: use of $route in routes.php - by richb201 - 11-05-2017, 02:14 PM
RE: use of $route in routes.php - by richb201 - 11-05-2017, 05:03 PM
RE: use of $route in routes.php - by Narf - 11-06-2017, 03:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB