Welcome Guest, Not a member yet? Register   Sign In
Cannot set controller in subdirectory as default controller
#1

[eluser]TheFuzzy0ne[/eluser]
Hi everyone.

First I'd like to congratulate everyone involved with the project. I've spent way too much time in the past trying to figure out the best way to do things with PHP, and could never really decide on a single solution. Now it all seems to have been done for me. All I need to do is stick some building blocks together, and hey presto! The MVC approach has been confusing me for some time now, and finally after reading through the entire documentation for CI, it's all become somewhat clearer.

The standalone documentation is superb - as is the in-script documentation, and the code is crystal clear - not to mention the screencasts. I now have a completely reborn approach towards PHP programming, and now, my hair is actually starting to grow back again, so many thanks (because it's really cold without it)!

Onto business...

I am trying to set my default controller and I keep getting a 404 error. The path of the file I want to use as the default controller (from the Web root) is:

Code:
/controllers/main/main.php

The config file has been set to:
Code:
$route['default_controller'] = "main/main";

But this doesn't work.

I've tried guessing, and using:

"main"
"main.main"
"main/main.php"

and still I've got nowhere. I can call the main.php controller via www.mysite.com/index.php/main/ without any problems. Is this a bug, or am I just being noobish?

I'd really appreciate any help anyone may have to offer.

Many thanks in advance.

Daz.


Messages In This Thread
Cannot set controller in subdirectory as default controller - by El Forum - 04-25-2008, 11:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB