Welcome Guest, Not a member yet? Register   Sign In
second controller not accessible
#21

[eluser]webdevguy32[/eluser]
Okay - thanks.
Just moved the administer.php controller up one level so it is on the same level as main and it worked fine. Go figure. I guess it threw up and doesn't feel well so I might copy files to a new project and start over. Who knows....
#22

[eluser]jairoh_[/eluser]
instead of
Code:
redirect('administer/member');
[/code]
use
Code:
redirect(  base_url( 'admin/administer/member' ) )

basing in your file system
[qoute]
/controller/main.php
/controller/admin/administer.php
[/qoute]
#23

[eluser]webdevguy32[/eluser]
Just tried that and it doesn't work - 404's out. It makes me want to look into the HMVC library.

Also tried site_url() in the redirect - same error.

Again, it works perfectly if I move the administer controller up one level. just... can't... figure... it... out

I know my set up should work, but there is only so much time I can spend, and you guys have the kind patience for, b4 moving on. It shouldn't be this difficult. But thanks kindly for your help.

I'm going to try this set up - changing the routes and let you know if that helps.
http://blog.biernacki.ca/2011/12/codeign...r-folders/

EDIT:
I tried adding this to the beginning of routes.php
Code:
$route['admin/administer/(:num)/(:any)']  = "administer/$1/$2";
It errored out and the url did not change, it was still:
http://localhost/mysite/admin/administer/member

I tried adding some slugs:
http://localhost/mysite/admin/administer...323/sdsdsd

same error and url.
#24

[eluser]webdevguy32[/eluser]
[quote author="Tpojka" date="1382381139"]Does it work without .htaccess file and with index.php in URL?

Edit:
Have
Code:
$this->load->helper('url');
?[/quote]
This helper is autoloaded. but i tried adding to the function and it did not change the error. Thanks.
#25

[eluser]webdevguy32[/eluser]
Okay, to summarize the essence of the problem. I have a controller MAIN under /controllers. I have a controller called administer under a sub-folder of controllers, called admin. In that folder I have a controller call administer. Visually, here it is:

/controller/main.php
/controller/admin/administer.php

I also have:
/controller/administer.php //for testing.

In MAIN controller, after user validation, I redirect to the administer controller/members method.

If I redirect to:
/controller/administer/members //the members method in the administer controller under controller root
it works fine.

If I redirect to:
/controller/admin/administer/members //the members method in the administer controller under admin sub-folder
it error 404.

You can see all the things above in this thread I have tried.

I have checked file & folder permissions, and, as you can see, have checked and trie almost everything we can think of.

If you have any other ideas, please let me know.

Many thanks.




Theme © iAndrew 2016 - Forum software by © MyBB