Welcome Guest, Not a member yet? Register   Sign In
default_controller gives 404
#1

[eluser]Sixer[/eluser]
Hi, my routes.php looks like this:
Code:
$route = array(
                 "default_controller"  => "c_Home", // 404
                 "scaffolding_trigger" => "",
                 "home"       => "c_Home",  // works
                 "tag/:any"  => "c_Tag/view",
                 "tags"        => "c_Tag/all"
                 );

As stated in the comments, my default_controller, that is visiting the site's domain, gives a CI generated 404. Visiting /home/ however takes me to the right page.

I've tried changing the URI protocol to the various options but no cigar.

I'm running CodeIgniter 1.6.3 on PHP5 and Apache 2.0.55 on Ubuntu 6.06.

Any ideas?
#2

[eluser]Aken[/eluser]
Do you have something overwriting it in your .htaccess file that you maybe forgot about?

I don't see any other way to cause two different results when pointing to the same controller (at least that I can think of off the top of my head).
#3

[eluser]Sixer[/eluser]
Both renaming .htaccess to something else, and turning off the RewriteEngine, make no difference.

I have been checking my controller's code, and none of the code loads a different view based on the URI. It always loads the same view, but only succeeds when visiting /home/.

Is there some way to get a more specific reason for a 404? 'cause I know it can mean that either a view couldn't be found or the controller wasn't pointed to correctly.
#4

[eluser]Sixer[/eluser]
I did some digging and luckily I've fixed it.

The destination value for $route['default_controller'] must be in lowercase, as well as the filename of the controller it points to.

This is unlike any other entry in $route.

:|




Theme © iAndrew 2016 - Forum software by © MyBB