Routes and other things.... |
[eluser]bronet[/eluser]
Hi, I'm working on a tvshow manager app and I do have some questions. I want to have urls like this: Quote:TVShow Info: http://localhost/show/1-white-collar/ And I use these rules in routes.php Code: $route['show/(:num)-(:any)/season-(:num)/ep-(:num)-(:any)'] = "manager/index/$1/$2/$3/$4/$5"; But.. when I acces: http://localhost/show/1-white-collar/hjhfjdhfh I receive something like this from $this->uri->rsegment_array(); (instead of 404 error) Code: Array ( [1] => manager [2] => index [3] => 1 [4] => white-collar [5] => hjhfjdhfh ) Or.. when I access: http://localhost/show/1-white-collar/season-dgfgfg/ I receive this: (instead of 404 error) Code: Array ( [1] => manager [2] => index [3] => 1 [4] => white-collar [5] => season-dgfgfg ) What can be wrong in my routes rules ?
[eluser]John_Betong_002[/eluser]
Try this: ./application/config/routes.php Code: $route["show"] = "manager"; // ./application.controllers/Manger.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); No doubt there may be better ways but at least this will get you started |
Welcome Guest, Not a member yet? Register Sign In |