routes not working - 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: routes not working (/showthread.php?tid=18480) Pages:
1
2
|
routes not working - El Forum - 05-07-2009 [eluser]learning_php[/eluser] Hi, I have set the following routes: Code: $route['default_controller'] = "homepage"; but they dont seem to be working on my site www.wesayido.co.uk Thanks routes not working - El Forum - 05-07-2009 [eluser]Dam1an[/eluser] You don't need the index.php in the re routed path, just the controller, method and args routes not working - El Forum - 05-07-2009 [eluser]learning_php[/eluser] Hi, i changed the routes to this: Code: $route['default_controller'] = "homepage"; and link to it like this: Code: <li><a href='homepage/index'>Homepage</a></li> but when i click the live link it takes me to this Code: http://www.wesayido.co.uk/index.php/gallery/homepage/index but the generated code displays this: Code: <li><a href='homepage/index'>Homepage</a></li> routes not working - El Forum - 05-07-2009 [eluser]Dam1an[/eluser] you have the index_page in the config set to index.php? as anchors are made up of your base url, index page, and the target routes not working - El Forum - 05-07-2009 [eluser]learning_php[/eluser] hi, i looked in the cofig file and it like this Code: $config['index_page'] = ""; Code: <li><a href='index.php'>Homepage</a></li> routes not working - El Forum - 05-07-2009 [eluser]Dam1an[/eluser] Do you have your htaccess to rewrite the index.php into the URL? Here's mine Code: DirectoryIndex index.php routes not working - El Forum - 05-08-2009 [eluser]learning_php[/eluser] Hi, This is my .htaccess file Code: <IfModule mod_rewrite.c> and my routes are now: Code: $route['default_controller'] = "homepage"; and i am linking to the pages like: Code: <li><a href=''>Homepage</a></li> and i get a 404 error???? routes not working - El Forum - 05-08-2009 [eluser]Thorpe Obazee[/eluser] I don't know if I get it but don't you need to have Code: echo anchor('info'); to get to homepage/info? then Code: echo anchor('gifts'); to get to homepage/gifts? The routing is quite weird. It's like you're doing routing the other way around. routes not working - El Forum - 05-08-2009 [eluser]xwero[/eluser] if you use links to the right controller and method why do you need to use routes? routes not working - El Forum - 05-08-2009 [eluser]learning_php[/eluser] Hi I changed my links to this: Code: <li><?= anchor('','Homepage');?></li> the homepage one refreshes the home page but on the Info i still get a 404? |