route for controller with default for setting - 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: route for controller with default for setting (/showthread.php?tid=52573) |
route for controller with default for setting - El Forum - 06-16-2012 [eluser]Unknown[/eluser] .htaccess Code: <IfModule mod_rewrite.c> routes.php Code: $route['default_controller'] = "web"; web.php (controller) Code: <?php news_model.php Code: function get_news($slug = FALSE) view Code: <h2 class="beritaterbaru">Berita terbaru :</h2> the problem is, when i clik news doesnt work, didnt show, and i thing the problem is routes, because my default controller is web, and didnt work. Exam: http://localhost/mitra/about.html ( work, the data it show ) and when news, http://localhost/mitra/pembukaan.kantor.cabang.pembantu ( didnt show the data ) but when i change my routes to : $route['default_controller'] = "web"; $route['404_override'] = ''; $route['(:any)'] = 'web/viewnews/$1'; data for may news it showing, but the other http://localhost/mitra/about.html dosnt show the data, please help me.. tq |