Welcome Guest, Not a member yet? Register   Sign In
simple $route['default_controller'] value, works locally, but fails remotely?
#1

[eluser]Govinda[/eluser]
Hi everyone

I seem to be so far unable to determine what is different between my local dev CI 2.1.0 install and the remote live testing copy.

In my
application/config/routes.php
file (local and remote) I have this:
Code:
$route['default_controller'] = "Around_the_Block";

In this file (which for sure exists, both locally and remotely):
application/controllers/Around_the_Block.php
...I have code that loads a view:
application/views/Around_the_Block_VIEW.php

and on my local machine, when I load:
http://localhost/mySitesDir/subdir1/subd.../index.php
..then sure enough, that 'Around_the_Block_VIEW.php' view loads fine.
..but on the remote site, I only get the familiar standard-issue CI 404 msg.:
"404 Page Not Found
The page you requested was not found."

If I change that default $route line in 'application/config/routes.php' (on the local and remote site), to this:
Code:
$route['default_controller'] = "welcome";
...then I get the familiar standard-issue CI welcome msg.:
"Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter...
"

..so I know my .htaccess is working right, and I am loading
application/controllers/welcome.php
and
application/views/welcome_message.php

The two controllers are in the same folder, and the two views are in the same folder, so the paths must be correct. I do not understand how I can be getting the 404 msg. in the one case of trying to (remotely) load the 'Around_the_Block.php' controller... when it works fine locally.

It seems like whatever is the issue here, it must be so basic .. but I need another pair of eyes, please.
Anyone have any thoughts how to narrow this down to find the culprit?

Thanks
-Govinda




Theme © iAndrew 2016 - Forum software by © MyBB