Carl_A - 06 February 2010 04:27 AM
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.
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