single system tolder, no index.php, sub-folders in controllers... oh the mess! |
[eluser]jblack199[/eluser]
So I'm trying something new (to me) with this new application I am building. And that is to use one system folder for all projects on a particular domain... but also with removing index.php from the url... so, this is what i've got... here is my current file structure.. |-documentroot-| --| index.php | --| inc | ---| css | ---| images | ---| js | --| system | --| tfamastery | ---| application | (i have the entire application folder here..) ----| controllers | -----| admin | ------| main.php | ----|main.php| ---| index.php | so that's my current file structure of it.. So I always autoload my session library and the url helper so I have those in auto load. in my config.php, i set my base_url as: http://www.insurancemavs.com/tfamastery/ and set my $config['index_page'] = ''; inside the tfamastery folder I have a .htaccess file with the following: Code: <IfModule mod_rewrite.c> I know it's running and working as when i go to the main domain it does infact redirect me to the www version of the page if i didn't go there with www anyway... in my index.php i did have to change the system folder path, and for that I used the full linux path of it... $system_path = '/home/account_user/html/insurancemavs.com/system'; the main.php listed in the admin subfolder in the controllers is a direct copy of the main.php in the controllers root... in routes.php i've changed my default controller to be main and i know that's working.... so, when i go to: http://www.insurancemavs.com/tfamastery i get the page I'm looking for.. if i go to: http://www.insurancemavs.com/tfamastery/admin/ i get a 404 error... but, if i go to: http://www.insurancemavs.com/tfamastery/...php/admin/ i get the page I am looking for... any ideas? EDIT: was my .htaccess... I used the same one I have for the root of my general purpose CI configuration.... so I had to add the tfamastery folder to the RewriteBase... |
Welcome Guest, Not a member yet? Register Sign In |