![]() |
Beginner, needs help with routes.php - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Beginner, needs help with routes.php (/showthread.php?tid=49448) |
Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]canado[/eluser] Hello everyone I have a small problem that I found with charles web debugging When my site loads it loads 2 times the default controller and then the view corresponding to the uri. Which means that if I load the home page, in charles web debugging I see home home home if I load another controller I have other controller (request start time 20/02/12 8:08:19AM) home (request start time 20/02/12 8:08:20AM) home (request start time 20/02/12 8:08:20AM) Maybe there is something either wrong or something else I must do to avoid loading the correct controller + 2 times the default controller Here is my routes.php, thanks Code: [php] Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]InsiteFX[/eluser] The default controller should always be the first one defined. Code: $route['default_controller'] = "home"; Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]canado[/eluser] thanks, I did what you suggested me, but I still have the same issue ;( Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]Aken[/eluser] Do you have any Ajax calls running on your pages? Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]canado[/eluser] yes I do have ajax calls Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]Aken[/eluser] ... That's a hint for "If you have Ajax calls, make sure they're calling correctly and not just grabbing the home page." Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]canado[/eluser] I have ajax calls but only on click and on that page it s not going to the home controller ; ( Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]meigwilym[/eluser] OK,if this is for the homepage, then I suggest commenting out all the custom routes and reloading the page. If it still happens then it's not your routing. Otherwise, add each route back one at a time and repeat. Regards, Mei Beginner, needs help with routes.php - El Forum - 02-20-2012 [eluser]canado[/eluser] ok thanks I ll do that ; - ) |