routing problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: routing problem (/showthread.php?tid=49142) |
routing problem - El Forum - 02-09-2012 [eluser]Unknown[/eluser] Hello together. the roouting doesn't seam to work, or I've configured the wrong way. I have a root folder: www.mysite.com/cm13 and have set this in the config.php Code: $config['base_url'] = 'http://www.mysite.com/cm13/'; In the routes.php file I've set the following: Code: $route['default_controller'] = "welcome"; My htaccess file hase the following code: Code: <IfModule mod_rewrite.c> The users controller: Code: class Users extends CI_Controller { but when I try to call http://www.mysite.com/cm13/users, I get an 404 error message. What can I do? Or what have I done wrong? routing problem - El Forum - 02-09-2012 [eluser]InsiteFX[/eluser] You cannot do routing like that! Also your .htaccess file will not allow that! CodeIgniter User Guide - URI Routing routing problem - El Forum - 02-09-2012 [eluser]Unknown[/eluser] I already viewed the URI Routing page. But don't understand why it doesn't work, and what ist required so that it works. routing problem - El Forum - 02-09-2012 [eluser]CroNiX[/eluser] Using {var} isn't a regular expression. Use the real controller/method names or use regular expressions in your routing rules. Same in your .htaccess. .htaccess gets processed the very first thing on each request, before CI gets the request. How is it supposed to know what {controller} and {method} are? Quote:Routes can either be specified using wildcards or Regular Expressions |