CodeIgniter Forums
Default_controller in routes.php changed but nothing happens - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Default_controller in routes.php changed but nothing happens (/thread-9294.html)



Default_controller in routes.php changed but nothing happens - El Forum - 06-20-2008

[eluser]ErwinVanHoof[/eluser]
Can someone help me out.
I'm having the following problem

I changed
-system
-application
-config
routes.php | Line 43
Code:
$route['default_controller'] = "welcome";
to
Code:
$route['default_controller'] = "pages";

created the pages.php in
-system
-application
-controllers
Code:
<?php

class Pages extends Controller {

    function Pages  ()
    {
        parent::Controller();
    }
    
    function index()
    {
        die('here');
    }

}

?>

but this does not seem to work, it works obly when I type the complete url http://localhost/pages/

Using CI 1.6.2 on a WAMP server 2 | Apache 2.0.63 | PHP 4.4.8

Could this be a caching problem ?


Default_controller in routes.php changed but nothing happens - El Forum - 06-20-2008

[eluser]xwero[/eluser]
Pags instead of Pages, or is that a typing error on the forum?


Default_controller in routes.php changed but nothing happens - El Forum - 06-20-2008

[eluser]ErwinVanHoof[/eluser]
Pages it is, sorry I typed pags on the forum, changed the post.


Default_controller in routes.php changed but nothing happens - El Forum - 06-20-2008

[eluser]sophistry[/eluser]
do you have any other routing?


Default_controller in routes.php changed but nothing happens - El Forum - 06-20-2008

[eluser]ErwinVanHoof[/eluser]
Yes, all routings work fine except the default 'changed' one.


Default_controller in routes.php changed but nothing happens - El Forum - 06-20-2008

[eluser]sophistry[/eluser]
so you have other routings. are they all listed AFTER the default ones? that can cause a problem if the custom ones are before the default and scaffolding ones.


Default_controller in routes.php changed but nothing happens - El Forum - 06-24-2008

[eluser]ErwinVanHoof[/eluser]
I found the problem (and fixed it). I was working in an alias (on apache) for testing purposes and the url rewrite in the .htaccess was pointing to the root directory of the site (where also CI is running) and that was why I kept seeing the welcome page.

Anyway, thnx for the help.