HMVC and application folder outside root gives 404 not found |
Hello,
I have CI3 with the following structure application public_html system Now I have HMVC for CodeIgniter 3 with the following structure application public_html /components /components/photalbums/config /components/photalbums/config/routes.php /components/photalbums/controllers /components/photalbums/controllers/com_photoalbum.php /components/photalbums/models /components/photalbums/views system Now I have in the components/photalbums/config/routes.php $route['test'] = 'com_photoalbum'; When going to localhost/test I get an 404 Probably $config['modules_locations'] = array(APPPATH . '../components/' => '../../components/',); in config is not set correct. I tried alot with Document Root etc --- In version CI2 with HMVC for CI2 I have the application directory in the public_html. Then with $config['modules_locations'] = array(APPPATH . '../components/' => '../../components/',); it is working Version 2 structure is public_html application /components /components/photalbums/config /components/photalbums/config/routes.php /components/photalbums/controllers /components/photalbums/controllers/com_photoalbum.php /components/photalbums/models /components/photalbums/views system Anyone an idea ?
This is what I have that works.
Code: $config['modules_locations'] = array( (04-02-2015, 06:28 AM)frocco Wrote: This is what I have that works. Yeah thats the default (where you have components in the application folder). In version 2 I had the components directory in the root (next to system and application) /application /components /system Then this ($config['modules_locations'] = array(APPPATH . '../components/' => '../../components/',) should be it. However now I have the application directory OUTSIDE the public and the components directory INSIDE the public. Then $config['modules_locations'] = array(APPPATH . '../components/' => '../../components/',); aint working
If I move components out of application, this is working for me.
/application /components /system Code: $config['modules_locations'] = array(
Yup thats correct (see my post)
Quote Me : Then this ($config['modules_locations'] = array(APPPATH . '../components/' => '../../components/',)Wink should be it. But now try with application and system outside public root AND components INSIDE public root That's the one I cannot figure out!
04-02-2015, 07:38 AM
(This post was last modified: 04-02-2015, 07:39 AM by Krycek. Edit Reason: typo )
These 2 values are changed
Code: /*
Found it.
It should be PHP Code: $config['modules_locations'] = array( |
Welcome Guest, Not a member yet? Register Sign In |