Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14114

use of $route in routes.php

$
0
0
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. 

Viewing all articles
Browse latest Browse all 14114


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>