How to use CI with multiple folders |
[eluser]Tim Brownlaw[/eluser]
[quote author="Carl_A" date="1265470045"]1. I do have an index() function.. and strangely everything works as long as I dont put the .htaccess file and use a complete link with index.php ( www.example.com/index.php/admin/controller_name ) It works perfectly with these links. 2. I followed the article here : http://codeigniter.com/wiki/mod_rewrite/ Every other controller (outside the subfolder) works perfectly with both www.example.com/index.php/controller_1 And www.example.com/controller_1 Its just the ones with the subfolder thats causing a problem.[/quote] I've just got this working. I can create a folder for instance - controllers/fred Under fred I created the controller has_a_big_nose.php ( my apologies to all the Freds out there) So a call to www.mysite.com/fred/has_a_big_nose works a treat. I used the very same htaccess file as you have listed, so it's not that causing the problem. - I'm using 1.7.2, - I've got my installation under public_html (to help prevent the snoopers snooping) - used the same htaccess file as you've mentioned. - I even had the $config['index_page'] = "index"; and it still worked. I've now blanked it with no change to operation. I'm a bit puzzled as to why it's not working for you unless something else is going on. What I did find is that you can only go one subfolder deep which is more than adequate. I've actually obscured my admin with something like controllers/furry_rabbits/admin.php Making my admin home page accessible via - www.mysite.com/furry_rabbits/admin If I think of anything else I may have done to get this working - I'll let you know. It's been a flurry of coding tonight so I may have missed something that would help you out. Keep at it, you'll get there! Cheers Tim
[eluser]Carl_A[/eluser]
Hi Tim, Thankyou for replying to such an old thread. Im unfortunately still having trouble with this issue. Considering we have both used similar folder structures, .htaccess files and config, I fail to understand why its not working for me. Maybe theres something that I missed? Are there any specific steps I needed to take to ensure this works for me? If so please let me know so I can back-track. |
Welcome Guest, Not a member yet? Register Sign In |